complex acos and atanh

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

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.

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.
participants (2)
-
John Maddock
-
Stephen Montgomery-Smith