Boost logo

Boost :

Subject: [boost] complex acos and atanh
From: Stephen Montgomery-Smith (stephen_at_[hidden])
Date: 2012-08-26 02:00:40


Hey people,

I was trying out your complex arc-trig functions, to compare them with
some that I have written: http://people.freebsd.org/~stephen/catrig.c.

I am finding that your acos function is getting some of them wrong. For
example, your program evaluates
acos(1.00000002785941 + I*5.72464869028403e-200)
as
0 - I*0.000236048349018331
whereas it should be
2.42520172707401e-196 - I*0.000236048349018331.

Also your complex atanh function does quite badly in some edge cases. I
presume it is because Hull, Fairgrieve and Tang did not write a paper on
that function. If you email Fairgrieve, he may give you a copy of the
paper that was never published. He sent me a copy, but doesn't want it
widely distributed.

I devised my own algorithm at
http://people.freebsd.org/~stephen/catrig.c, which actually turns out to
be very similar to the unpublished algorithm of Hull, Fairgrieve and Tang.

Anyway, I would be happy to work with whomever is currently working on
these algorithms. I think someone must be, because I see that someone
fixed a bug in asin since 1.48.0.

Best regards,
Stephen


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