Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Aug 2009 19:38:49 +1000
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        freebsd-arch@FreeBSD.ORG
Subject:   Re: C99 Complex Math Functions
Message-ID:  <20090821093849.GA33774@server.vk2pj.dyndns.org>
In-Reply-To: <20090820230400.GA61066@troutmask.apl.washington.edu>
References:  <20090815015947.GA4682@server.vk2pj.dyndns.org> <20090817201319.GA22437@zim.MIT.EDU> <20090820230400.GA61066@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--XsQoSWH+UP9D9v3l
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2009-Aug-20 16:04:00 -0700, Steve Kargl <sgk@troutmask.apl.washington.ed=
u> wrote:
>On Mon, Aug 17, 2009 at 04:13:19PM -0400, David Schultz wrote:
>> On Sat, Aug 15, 2009, Peter Jeremy wrote:
>> > I've recently had a requirement for the C99 complex math functions.
>> > I know you have been doing some work on implementing functions in
>> > complex.h and wonder what (if any) plans you have for implementing
>> > the rest of the C99 functions.
>>=20
>> Which ones do you need?

cacos, cacosh, casin, casinh, catan, catanh, ccos, ccosh, cexp, clog,
cpow, csin, csinh, ctan, ctanh :-)

>> Many of the functions can be fudged with some simple formulas that
>> you can look up.

I have all the simple formulae.

>>  The simple formulas work great in most cases,
>> but often fail near asymptotes and for special cases (infinity,
>> NaN, underflow, etc.)

And simplistic implementations can lose significant amounts of
precision as well.

>In a private response to Peter, I directed him to NetBSD.

Thanks for that.  I've also discovered that math/gsl also implements
the required functions (though with non-standard names and argument
types).  Since I already have gsl available, I might use it instead.
(As a warning for anyone else interested in math/gsl - it's complex
functions are implemented very simplisticly - no better than NetBSD).

--=20
Peter Jeremy

--XsQoSWH+UP9D9v3l
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (FreeBSD)

iEYEARECAAYFAkqOaykACgkQ/opHv/APuIf7xQCcDiVq+12gFn3b76a1xiJED+Ok
ppcAoKJHuZPToapOz7lETx6BcN3aj93R
=U+rf
-----END PGP SIGNATURE-----

--XsQoSWH+UP9D9v3l--



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