Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2006-09-26 06:03:01


Hubert,

If you have a couple of minutes, can you explain why you multiply the
absolute error by cosh(x) in the asinh tests:

T y = sinh(x);
T z = asinh(y);
T absolute_error = abs(z-x);
T relative_error = absolute_error*cosh(x); // Why????
T scaled_error = relative_error/epsilon;

Without that and using the usual definition of relative error in this case:

fabs(z-x)/x

Then I see an error of 0.5eps for the case that fails on Linux/AMD64.

However with the multiplication by cosh(x) in place (which is a largish
value for some of the test inputs) I believe the test will only pass if the
error is zero, which is not the case on Linux AMD64.

BTW, I'm not familiar with the term "scaled error", I don't see anything
useful with a web search either?

Thanks,

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk