From owner-freebsd-numerics@FreeBSD.ORG Sun Aug 12 23:12:28 2012 Return-Path: Delivered-To: freebsd-numerics@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68C5D106566B for ; Sun, 12 Aug 2012 23:12:28 +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 105748FC0A for ; Sun, 12 Aug 2012 23:12:27 +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 q7CNCRmC075919 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Aug 2012 09:12:28 +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 q7CNCL75021813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 13 Aug 2012 09:12:21 +1000 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q7CNCLMl021812 for freebsd-numerics@freebsd.org; Mon, 13 Aug 2012 09:12:21 +1000 (EST) (envelope-from peter) Resent-From: Peter Jeremy Resent-Date: Mon, 13 Aug 2012 09:12:21 +1000 Resent-Message-ID: <20120812231221.GS20453@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: <20120722231300.GA8033@server.rulingia.com> References: <20120721032448.X5744@besplex.bde.org> <5009BD6C.9050301@missouri.edu> <20120721123522.T877@besplex.bde.org> <500A2565.9090009@missouri.edu> <20120721181204.A1702@besplex.bde.org> <500B594D.1020305@missouri.edu> <20120722125300.P2246@besplex.bde.org> <500C1B1A.5070107@missouri.edu> <20120723015912.K5029@besplex.bde.org> <500C79A1.6080809@missouri.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline In-Reply-To: <500C79A1.6080809@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:12:28 -0000 X-Original-Date: Mon, 23 Jul 2012 09:13:00 +1000 X-List-Received-Date: Sun, 12 Aug 2012 23:12:28 -0000 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Jul-22 17:07:29 -0500, Stephen Montgomery-Smith wrote: >I tested out the casinh program. After a small tweek, the worst case=20 >ULP is about 2.5 or 3. Edge cases close to I do very well, with a ULP=20 >of about 0.5. I am very pleased with how well it performs. That's excellent. I think the exception handling in clog() needs some work - in particular, input NaNs should be returned, rather than returning new default NaNs. >I looked at Peter Jeremy's code for catanh, and I notice that he hasn't=20 >yet worked to get optimal ULP, since he has concentrated on the handling= =20 >of the edge cases. As I've previously mentioned, I believe handling the exception cases can be done completely independently of handling the "normal" cases and I was focussing on the former since it is just a (simple) matter of implementing the text in n1256 G.6.2.3. >If Peter is OK with me butting in, I'll could try to work on getting=20 >optimal ULP for catanh. I think it will be easier to analyze than=20 >casinh, since no csqrts need to be involved. I anticipate that the hard= =20 >case will be when z is close to the imaginary axis, and moderately large= =20 >(like 1e-5 + 10*I). The "normal" cases are (algorithmetically with '^' as exponentiation): catanh(z) =3D clog((1+z)/(1-z))/2 =3D (clog(1+z) - clog(1-z))/2 catanh(x+I*y) =3D log((y^2 + (1+x)^2)/(y^2 + (1-x)^2))/4 + I*atan2(y^2, 1-x= ^2-y^2)/2 None of these approaches behave cleanly when |z| is close to 1. If you have some insights, feel free to work on it. --=20 Peter Jeremy --uAKRQypu60I7Lcqm Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlAMiPwACgkQ/opHv/APuIe48ACgpA3iF4khaKiaOrVgd6KWaWnn pg0AoL+hqCD6aZuaoPj85qSJZ1hX3bgX =L1Wx -----END PGP SIGNATURE----- --uAKRQypu60I7Lcqm--