Complex arg-trig functions
Stephen Montgomery-Smith
stephen at missouri.edu
Sun Aug 26 22:30:51 UTC 2012
On 08/26/2012 05:25 PM, Steve Kargl wrote:
> On Sun, Aug 26, 2012 at 04:50:18PM -0500, Stephen Montgomery-Smith wrote:
>> On 08/23/2012 10:07 PM, Stephen Montgomery-Smith wrote:
>>> I just found out that the boost libraries implement the complex asin
>>> function. I think their implementation is more faithful to the paper by
>>> Hull et al than my implementation is. It does seem to have a BSD style
>>> license. The only problem with it is that it is written in C++.
>>>
>>> http://www.boost.org/doc/libs/1_43_0/boost/math/complex/asin.hpp
>>
>> It turns out that this version of asin.hpp had a bug. Look instead at
>> http://www.boost.org/doc/libs/1_51_0/boost/math/complex/asin.hpp
>>
>> Their acos is a bit buggier. Their atanh is quite a lot buggier. Here
>> are bugfixes:
>> https://svn.boost.org/trac/boost/ticket/7290
>> https://svn.boost.org/trac/boost/ticket/7291
>>
>> Their asin seems to be about 10-15% faster than mine. Their error is
>> slightly higher (4.5 ULP instead of 4ULP). The algorithm they used will
>> work directly for float, whereas my algorithm needed adjustments from
>> the double to the float version.
>
> I don't know others opinion on C++ and libm, but I would much
> prefer to keep libm sources based in C.
I wouldn't recommend using these files "as is." But converting them all
to C would be a fairly easy thing to do.
And of course, I would prefer to use my catrig functions.
More information about the freebsd-numerics
mailing list