From owner-freebsd-numerics@FreeBSD.ORG Sat Sep 22 20:54:15 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 0ADC6106564A for ; Sat, 22 Sep 2012 20:54:15 +0000 (UTC) (envelope-from stephen@missouri.edu) Received: from wilberforce.math.missouri.edu (wilberforce.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id B82398FC08 for ; Sat, 22 Sep 2012 20:54:14 +0000 (UTC) Received: from [127.0.0.1] (wilberforce.math.missouri.edu [128.206.184.213]) by wilberforce.math.missouri.edu (8.14.5/8.14.5) with ESMTP id q8MKsDLf047053; Sat, 22 Sep 2012 15:54:13 -0500 (CDT) (envelope-from stephen@missouri.edu) Message-ID: <505E2575.6030302@missouri.edu> Date: Sat, 22 Sep 2012 15:54:13 -0500 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: Bruce Evans References: <5017111E.6060003@missouri.edu> <20120916041132.D6344@besplex.bde.org> <50553424.2080902@missouri.edu> <20120916134730.Y957@besplex.bde.org> <5055ECA8.2080008@missouri.edu> <20120917022614.R2943@besplex.bde.org> <50562213.9020400@missouri.edu> <20120917060116.G3825@besplex.bde.org> <50563C57.60806@missouri.edu> <20120918012459.V5094@besplex.bde.org> <5057A932.3000603@missouri.edu> <5057F24B.7020605@missouri.edu> <20120918162105.U991@besplex.bde.org> <20120918232850.N2144@besplex.bde.org> <20120919010613.T2493@besplex.bde.org> <505BD9B4.8020801@missouri.edu> <20120921172402.W945@besplex.bde.org> <20120921212525.W1732@besplex.bde.org> <505C7490.90600@missouri.edu> <20120922042112.E3044@besplex.bde.org> <505CBF14.70908@missouri.edu> <505CC11A.5030502@missouri.edu> <20120922081607.F3613@besplex.bde.org> <20120922091625.Y3828@besplex.b! de.org> <505D1037.8010202@missouri.edu> <20120922142349.X4599@besplex.bde.org> <20120923044814.S1465@besplex.bde.org> In-Reply-To: <20120923044814.S1465@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-numerics@FreeBSD.org Subject: Re: Complex arg-trig functions 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: , X-List-Received-Date: Sat, 22 Sep 2012 20:54:15 -0000 On 09/22/2012 03:09 PM, Bruce Evans wrote: > % +static const volatile float > % tiny = 0x1p-10000L; I assume you meant to also change tiny to 0x1p-100. > % > > That's all the new changes. Now from the old patch: > > @ diff -u2 catrig.c~ catrig.c > @ --- catrig.c~ 2012-09-21 15:51:00.000000000 +0000 > @ +++ catrig.c 2012-09-22 18:41:34.779454000 +0000 > @ @@ -577,20 +607,24 @@ > @ ... > @ if (ax == 1) > @ ry = atan2(2, -ay) / 2; > @ - else if (ay < FOUR_SQRT_MIN) > @ + else if (ay < DBL_EPSILON) > @ ry = atan2(2*ay, (1-ax)*(1+ax)) / 2; > @ else > > You accepted this without comment. My calculation is that since ax > != 1, |1-ax*ax| is at lease 2*DBL_EPSILON; ay < DBL_EPSILON makes > ay*ay < DBL_EPSILON**2, so it is insignificant. This threshold might > be off by a small factor. Yes, I think I wasn't paying attention. But I agree with you.