
"John Maddock" <john@johnmaddock.co.uk> writes: | "Lars Gullik Bjønnes" wrote: | > On gcc 4.1.1 glibc 2.4 x86_64 linux. | > | > If I use asinhf from glibc then the test works, if I use asinh from | > boost::math then it fails. (This is for float) | | Perplexing, it probably needs someone with an interest in numerics to debug | it on that platform to figure this out, especially as the asinh code for | that test case is a completely trivial: | | return( log( x + sqrt(x*x+one) ) ); | | We might be able to eliminate a couple of obvious ones though: can you find | out what std::sinh(3.8F) returns? First 9 digits please :-) std::sinh(3.8F) = 22.3394069672 sinhf(3.8F) = 22.3394069672 (*) But perhaps more interesting: asinhf(*) = 3.79999995232 boost::math:asinhf(*) = 3.80000019073 And: x = std::sinh(3.8F); logf( x + sqrtf(x*x+one) = 3.80000019073 log( x + sqrt(x*x+one) = 3.79999995232 std::log( x + std::sqrt(x*x+one) = 3.80000019073 So it seems that glibc asinhf is using double precision internally, and that this somehow contributes to makeing the testcase fail. I think this is close to as far as I can test... far away from my domain already. | Then what happens if you add a boost::math:: qualifier to the asinh call in | asinh_test.hpp and re-run the test? In my tests that does not make a difference. | I'm also pleased to see I'm not the only person who mis-types "math" as | "match"!! :-) Hmm... must be the brain-stem in the fingers taking over. -- Lgb