Boost logo

Boost Testing :

From: Jim Douglas (jim_at_[hidden])
Date: 2006-01-18 07:52:26



This failure only occurs with the Dinkumware library. All calls to the
trig functions for both GNU & Dinkum C++ libs will be routed through to
the common libm. So, in theory the results will be the same.

Where the difference lies in in the implementation of the C++ "complex"

Perhaps we should be running comparative tests on these?


I'll try the test below later.


John Maddock wrote:
>>>I ran your program (output file is attached) and it appears to be
>>>working OK. Could it be that the test is malfunctioning?
> That's weird: I've reworked the tests to provide more information, and they
> definitely seem to show std::cos malfunctioning: the results from acos match
> what I see on other platforms, but cos seems to jump from good to bad
> behaviour when the imaginary part is small.
> In theory at least a reduced test case is below, please make sure you build
> with exactly the same options as the bjam-invoked test cases (looks like
> it's "QCC" -V3.3.5,gcc_ntox86_cpp -gstabs+ sourcefile.cpp -lm)
> John.
> Here's the test case:
> #include <boost/math/complex.hpp>
> #include <iostream>
> #include <iomanip>
> int main()
> {
> std::complex<double> cd(2.62441, 0.541914);
> std::complex<double> cd2 = std::cos(cd);
> std::cout << cd2 << std::endl;
> return 0;
> }
> which should output:
> (-1,-0.28125)

Boost-testing list run by mbergal at