Date: Sun, 12 Aug 2012 23:08:19 -0000 From: Peter Jeremy <peter@rulingia.com> To: Stephen Montgomery-Smith <stephen@missouri.edu> Cc: Diane Bruce <db@db.net>, Steve Kargl <sgk@troutmask.apl.washington.edu>, John Baldwin <jhb@freebsd.org>, David Chisnall <theraven@freebsd.org>, Bruce Evans <bde@freebsd.org>, Bruce Evans <brde@optusnet.com.au>, David Schultz <das@freebsd.org>, Warner Losh <imp@bsdimp.com> Subject: Re: Use of C99 extra long double math functions after r236148 Message-ID: <20120718224222.GA6022@server.rulingia.com> Resent-Message-ID: <20120812230812.GC20453@server.rulingia.com> In-Reply-To: <500725F2.7060603@missouri.edu> References: <C527B388-3537-406F-BA6D-2FA45B9EAA3B@FreeBSD.org> <20120713155805.GC81965@zim.MIT.EDU> <20120714120432.GA70706@server.rulingia.com> <20120717084457.U3890@besplex.bde.org> <5004A5C7.1040405@missouri.edu> <5004DEA9.1050001@missouri.edu> <20120717200931.U6624@besplex.bde.org> <5006D13D.2080702@missouri.edu> <20120718205625.GA409@troutmask.apl.washington.edu> <500725F2.7060603@missouri.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
--5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Jul-18 10:07:41 -0500, Stephen Montgomery-Smith <stephen@missouri.e= du> wrote: >I went on a long road trip yesterday, so I didn't get any code written, >but I did have a lot of thoughts about clog and casinh. Can I suggest you have a read through "Implementing the Complex Arcsine and Arccosine Functions Using Exception Handling" by T. E. Hull Thomas F. Fairgrieve and Ping Tak Peter Tang, ACM Transactions on Mathematical Software, Vol. 23, No. 3, September 1997. Based on a quick skim, it includes fairly detailed pseudocode, together with an error analysis. On 2012-Jul-18 16:09:06 -0500, Stephen Montgomery-Smith <stephen@missouri.e= du> wrote: >Am I to understand that the inexact flag should be set anytime a=20 >floating point operation produces an answer that is not guaranteed=20 >exact? My understanding is, yes. For the transcendental functions, that means the inexact flag should almost always be raised and the problem becomes when not to raise it. Eg sin(0) =3D=3D 0 and presumably doesn't set the inexact flag. > For example, should 1.0/3.0 and sqrt(2.0) raise the inexact flag? Yes and yes. I notice our sqrtl() actually tests the inexact flag of an intermediate calculation to determine the correct rounding for the result. I've also found that Abramowitz and Stegun "Handbook of Mathematical Functions", 10th printing, is available online at http://people.maths.ox.ac.uk/~macdonald/aands/index.html and various mirrors. I'm still looking for a copy of Cody & Waite. BTW, thanks to Steve & Bruce for the comments on my code. I'll clean it up and have another try but that will probably take a couple of days. --=20 Peter Jeremy --5vNYLRcllDrimb99 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlAHO84ACgkQ/opHv/APuIc2ngCgh7TDm5e3FUwcnq43FqJ9naeL dtEAn04/LfA0fG+dz/usJc7Tai8MvlNA =LzcB -----END PGP SIGNATURE----- --5vNYLRcllDrimb99--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120718224222.GA6022>