Boost logo

Boost :

Subject: Re: [boost] complex acos and atanh
From: John Maddock (boost.regex_at_[hidden])
Date: 2012-08-26 07:54:55


> 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.

That would be me I guess ;-)

Can you please file a bug report at svn.boost.org with the cases that fail?
If you can provide patches even better as I don't have much time at present!

Many thanks, John.


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