Boost logo

Boost Testing :

From: John Maddock (john_at_[hidden])
Date: 2006-01-18 06:19:42


>> 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 meta-comm.com