Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Aug 2012 15:25:22 -0700
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        Stephen Montgomery-Smith <stephen@missouri.edu>
Cc:        freebsd-numerics@freebsd.org
Subject:   Re: Complex arg-trig functions
Message-ID:  <20120826222522.GA68366@troutmask.apl.washington.edu>
In-Reply-To: <503A9A1A.1050004@missouri.edu>
References:  <20120814072946.S5260@besplex.bde.org> <50297CA5.5010900@missouri.edu> <50297E43.7090309@missouri.edu> <20120814201105.T934@besplex.bde.org> <502A780B.2010106@missouri.edu> <20120815223631.N1751@besplex.bde.org> <502C0CF8.8040003@missouri.edu> <503265E8.3060101@missouri.edu> <5036EFDB.3010304@missouri.edu> <503A9A1A.1050004@missouri.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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.  First, I don't C++
so can't work on the source as either a reviewer or debugging.
Second, does this then mean that one needs to link with libc++?
Finally, the start of the file is

#ifndef BOOST_MATH_COMPLEX_DETAILS_INCLUDED
#  include <boost/math/complex/details.hpp>
#endif
#ifndef BOOST_MATH_LOG1P_INCLUDED
#  include <boost/math/special_functions/log1p.hpp>
#endif
#include <boost/assert.hpp>

So, we would need to include three additional files.

-- 
Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120826222522.GA68366>