From owner-freebsd-numerics@FreeBSD.ORG Sun Aug 12 23:13:03 2012 Return-Path: Delivered-To: freebsd-numerics@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F000106564A for ; Sun, 12 Aug 2012 23:13:03 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id A5D428FC0C for ; Sun, 12 Aug 2012 23:13:02 +0000 (UTC) Received: from server.rulingia.com (c220-239-249-137.belrs5.nsw.optusnet.com.au [220.239.249.137]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q7CND2a6075941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Aug 2012 09:13:02 +1000 (EST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q7CNCujx021867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 13 Aug 2012 09:12:56 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q7CNCuCt021865 for freebsd-numerics@freebsd.org; Mon, 13 Aug 2012 09:12:56 +1000 (EST) (envelope-from peter) Resent-From: Peter Jeremy Resent-Date: Mon, 13 Aug 2012 09:12:56 +1000 Resent-Message-ID: <20120812231256.GX20453@server.rulingia.com> Resent-To: freebsd-numerics@freebsd.org From: Peter Jeremy Mail-Followup-To: freebsd-numerics@freebsd.org To: Stephen Montgomery-Smith Message-ID: <20120721043052.GB73662@server.rulingia.com> References: <20120719205347.T2601@besplex.bde.org> <50084322.7020401@missouri.edu> <20120720035001.W4053@besplex.bde.org> <50085441.4090305@missouri.edu> <20120720162953.N2162@besplex.bde.org> <20120720184114.B2790@besplex.bde.org> <50097128.6030405@missouri.edu> <20120721032448.X5744@besplex.bde.org> <500A0DCF.4030707@missouri.edu> <500A139D.2090803@missouri.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MW5yreqqjyrRcusr" Content-Disposition: inline In-Reply-To: <500A139D.2090803@missouri.edu> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Diane Bruce , Bruce Evans , John Baldwin , David Chisnall , Bruce Evans , Steve Kargl , David Schultz , Warner Losh Subject: Re: Use of C99 extra long double math functions after r236148 X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussions of high quality implementation of libm functions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 12 Aug 2012 23:13:03 -0000 X-Original-Date: Sat, 21 Jul 2012 14:30:52 +1000 X-List-Received-Date: Sun, 12 Aug 2012 23:13:03 -0000 --MW5yreqqjyrRcusr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Jul-20 21:27:41 -0500, Stephen Montgomery-Smith wrote: >The way they handle the real part of clog(z), log(hypot(x,y)), when=20 >hypot(x,y) is close to 1, is to do the calculation in double precision.=20 > So to do it properly, we need a double double precision arithmetic,=20 >which we don't have. Actually, we do. r230363 includes both extended and quad long-double emulation code in lib/libc/softfloat. There's also ld128 code under lib/libc/sparc64/fpu. >The paper says that simulating double precision arithmetic using single=20 >arithmetic is slow, so I would think the same is true for quad-precision. It depends how much af the arithmetic needs to be in more-than-double precision. Possibly, careful choice of partitioning would allow double precision to be used for most values with multi-precision only needed some of the time. I expect catanh() will run into similar problems evaluating clog((1 + z)/(1 - z)). Something like clog1p() would help when z=20 is close to 1, as will using alternative expansions. >Does the inexact flag also raise the SIGFPE signal? It's under program control - see feenableexcept() and fedisableexcept(), --=20 Peter Jeremy --MW5yreqqjyrRcusr Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlAKMHwACgkQ/opHv/APuIdDewCfdQfziJIblEBpobdLeISWPnRV OUcAoMDn0liv1DgjH4J8NmH2xnXSPcAe =NIRR -----END PGP SIGNATURE----- --MW5yreqqjyrRcusr--