Boost logo

Boost :

Subject: Re: [boost] complex acos and atanh
From: Stephen Montgomery-Smith (stephen_at_[hidden])
Date: 2012-08-26 11:28:28


On 08/26/2012 06:54 AM, John Maddock wrote:
>> 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.

#7290: complex acos is occasionally wrong
#7291: complex atan is not the best it could be

I'm going to leave the boost list for now. Email me privately if you
have further questions.

I would try to provide patches, but I also am very busy right now.


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