Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2008-08-08 12:18:16

Hubert Holin wrote:
> Paris (U.E.), le 08/08/2008
> Bonjour
> This not only looks just plain wrong, it *IS* just plain wrong... or
> at the very least badly suboptimal. Sorry! To fix it (as it is
> correctly in asinh.hpp), one has to add:
> static T const upper_taylor_n_bound = one/
> taylor_n_bound;
> and replace "else if (x >= taylor_n_bound)" by "else if (x >=
> upper_taylor_n_bound)" at the line you point out.

Hmm, isn't the final else clause for x near 1?

So the check would be

else if(x - 1 > taylor_n_bound)

> The reason this has not been detected by the unit tests is rather
> unfortunate: due to a very poor QOI of GCC on 64 bits ppc (my platform
> of choice at the time), the unit tests are rather lenient, and only
> compare the functions to test with (user platform) library provided
> functions, instead of also comparing with hand-computed special
> values. Perhaps is it now time to change this?

Nod, how about adding some tests along the lines of the newer special
functions where we test both random values (with results computed at high
precision), and a few specific sanity-check values generated by ? That way we can get a much better handle on the
accuracy, and any potential problem area of these older functions. I can
try and work up some tests in week or so if that would help, or can you
handle this?

Cheers, John.

Boost list run by bdawes at, gregod at, cpdaniel at, john at