From owner-freebsd-numerics@FreeBSD.ORG Wed Aug 15 18:15:57 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 91381106564A for ; Wed, 15 Aug 2012 18:15:57 +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 4DA6D8FC08 for ; Wed, 15 Aug 2012 18:15:56 +0000 (UTC) Received: from [128.206.184.213] (wilberforce.math.missouri.edu [128.206.184.213]) by wilberforce.math.missouri.edu (8.14.5/8.14.5) with ESMTP id q7FIFtfl051501; Wed, 15 Aug 2012 13:15:55 -0500 (CDT) (envelope-from stephen@missouri.edu) Message-ID: <502BE75B.6060301@missouri.edu> Date: Wed, 15 Aug 2012 13:15:55 -0500 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120728 Thunderbird/14.0 MIME-Version: 1.0 To: Bruce Evans References: <5017111E.6060003@missouri.edu> <501C361D.4010807@missouri.edu> <20120804165555.X1231@besplex.bde.org> <501D51D7.1020101@missouri.edu> <20120805030609.R3101@besplex.bde.org> <501D9C36.2040207@missouri.edu> <20120805175106.X3574@besplex.bde.org> <501EC015.3000808@missouri.edu> <20120805191954.GA50379@troutmask.apl.washington.edu> <20120807205725.GA10572@server.rulingia.com> <20120809025220.N4114@besplex.bde.org> <5027F07E.9060409@missouri.edu> <20120814003614.H3692@besplex.bde.org> <50295887.2010608@missouri.edu> <20120814055931.Q4897@besplex.bde.org> <50297468.20902@missouri.edu> <20120814173931.V934@besplex.bde.org> <502A820C.6060804@missouri.edu> <502A8494.2050707@missouri.edu> <502A9B99.7090309@missouri.edu> <502B1817.5070401@missouri.edu> <20120816030731.A2899@besplex.bde.org> In-Reply-To: <20120816030731.A2899@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: Wed, 15 Aug 2012 18:15:57 -0000 On 08/15/12 12:13, Bruce Evans wrote: > On Tue, 14 Aug 2012, Stephen Montgomery-Smith wrote: > >> I was looking through the code e_acosh.c, and it made me realize I >> could get a small fraction more ULP in catrig.c by making the >> replacements: >> >> 216c216 >> < *rx = log1p(Am1 + sqrt(Am1*(A+1))); >> --- >>> *rx = log1p(Am1 + sqrt(2*Am1 + Am1*Am1)); >> 282c282 >> < *sqrt_A2my2 = sqrt(Amy*(A+y)); >> --- >>> *sqrt_A2my2 = sqrt(2*y*Amy + Amy*Amy); >> >> I'm not quite sure if the second replacement makes much difference, >> but the first replacement seemed quite effective. > > This seems to be slightly worse. In my tests, it makes little difference > to the peak error, but unimproves the number of correctly rounded cases > quite often. I ran some all night tests, and I came to the same conclusion, except for the peak error. I'll revert it back.