Date: Sat, 22 Sep 2012 15:54:13 -0500 From: Stephen Montgomery-Smith <stephen@missouri.edu> To: Bruce Evans <brde@optusnet.com.au> Cc: freebsd-numerics@FreeBSD.org Subject: Re: Complex arg-trig functions Message-ID: <505E2575.6030302@missouri.edu> In-Reply-To: <20120923044814.S1465@besplex.bde.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?505E2575.6030302>