From owner-freebsd-arch@FreeBSD.ORG Fri Aug 21 09:38:52 2009 Return-Path: Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB9591065691 for ; Fri, 21 Aug 2009 09:38:52 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.freebsd.org (Postfix) with ESMTP id 7AD008FC43 for ; Fri, 21 Aug 2009 09:38:52 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-255-167.belrs3.nsw.optusnet.com.au [122.106.255.167]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n7L9cndk018353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 21 Aug 2009 19:38:50 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id n7L9cn1V034385 for ; Fri, 21 Aug 2009 19:38:49 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id n7L9cns8034384 for freebsd-arch@FreeBSD.ORG; Fri, 21 Aug 2009 19:38:49 +1000 (EST) (envelope-from peter) Date: Fri, 21 Aug 2009 19:38:49 +1000 From: Peter Jeremy To: freebsd-arch@FreeBSD.ORG Message-ID: <20090821093849.GA33774@server.vk2pj.dyndns.org> References: <20090815015947.GA4682@server.vk2pj.dyndns.org> <20090817201319.GA22437@zim.MIT.EDU> <20090820230400.GA61066@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline In-Reply-To: <20090820230400.GA61066@troutmask.apl.washington.edu> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: C99 Complex Math Functions X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Aug 2009 09:38:53 -0000 --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 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--