|
Boost Testing : |
From: Jim Douglas (jim_at_[hidden])
Date: 2006-01-11 06:25:32
John Maddock wrote:
>>The failure to compile log1p.hpp and expm1.hpp is caused by the fact
>>that the maths functions are promoted int the std namespace when using
>>'cmath' from the Dinkumware C++ library. You are currently looking for
>>them in the global namespace.
>
> I think I might be missing an include of <math.h> actually, as those symbols
> have no business being in namespace std.
The way this library is constructed seems to be that in general if you
use the C++ 'c*' equivalent of a C '*.h' header, all the functions get
promoted into the std namespace. This is not the first time we have
encountered this problem.
>>complex_test:
>>
>>Could you please provide some pointers as to why this test is
>>failing. I tried to run the test manually from a terminal window and
>>it appeared to drop into an endless loop. I terminated it after 5
>>mins of staring at Matrix-like output :-) Note that the text on the
>>regression test web page is truncated.
>
> It's not an infinite loop: it's just that almost every single test is
> failing, and there are a heck of a lot of tests! Frankly I have no idea
> what's going on here, it would take some debugging to find out, but it's
> suspicious to me that the tests pass on every other platform except this
> one. Having said that Dinkumware libs are normally very high quality, so
> .... <shrug> I guess.
So it's likely to be one simple stupid factor at the heart of it all. :-)
> If you're willing to spend the time and load this into a debugger, the thing
> to do is a comparitive debug: the first failure occurs at complex_test.cpp
> line 124, with x = -1, y = -0.28125, if you step into the acos in:
> std::complex<T> result = std::cos(boost::math::acos(val)); then the value
> returned should be {2.624, 0.5419}, and std::cos should convert it back to
> {-1, -0.28125}. So the first call is to discover whether it's std::cos or
> boost::acos that's at fault.
Thanks for the hints. I will investigate.
Jim