No subject


Thu Mar 29 20:50:10 PDT 2007


616 real coth(real x)
617 {
618         return 1 / tanh(x);
619 }
620 
621 unittest
622 {
623         assert(feq(coth(1), cosh(1) / sinh(1)));
624 }

This test fails with dmd 2.007 and doesn't with dmd 2.006 (using the 2.006
phobos code, 2.007's phobos needs dmd 2.007 to build, but there's no changes to
the math code in phobos between 2.006 and 7).

My attempts to reduce the failure so far have been interesting.  Adding
printf's of each of the function results shows that adding a writeln for cosh
is enough to make the error go away.  One write of cosh(1) shows inf as the
result.  Two writes of cosh(1): first is inf, second is 1.54308.

I tried pulling the test code out to it's own tiny .d file and it doesn't fail.
 It always prints 1.54308 for cosh(1).


-- 



More information about the Digitalmars-d-bugs mailing list