From owner-freebsd-bugs@FreeBSD.ORG Fri Jul 27 14:39:58 2012 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CBAA106566B; Fri, 27 Jul 2012 14:39:58 +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 C75E58FC14; Fri, 27 Jul 2012 14:39:57 +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 q6REdtWo050130; Fri, 27 Jul 2012 09:39:56 -0500 (CDT) (envelope-from stephen@missouri.edu) Message-ID: <5012A83B.3010404@missouri.edu> Date: Fri, 27 Jul 2012 09:39:55 -0500 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Bruce Evans References: <201207270247.q6R2lkeR021134@wilberforce.math.missouri.edu> <20120727233939.A7820@besplex.bde.org> In-Reply-To: <20120727233939.A7820@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bugs@freebsd.org, FreeBSD-gnats-submit@freebsd.org, Stephen Montgomery-Smith Subject: Re: bin/170206: complex arcsinh, log, etc. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2012 14:39:58 -0000 On 07/27/2012 09:26 AM, Bruce Evans wrote: > On Wed, 25 Jul 2012, Stephen Montgomery-Smith wrote: > >> This function seems to be able to compute clog with a worst case >> relative error of 4 or 5 ULP. >> ... > > I lost your previous reply about this after reading just the first part. > Please resend if interested. > > First part recovered by vidcontrol: > > VC> > I'm still working on testing and fixing clog. Haven't got near > the more > VC> > complex functions. > VC> > > VC> > For clog, the worst case that I've found so far has x^2+y^2-1 ~= > 1e-47: > VC> > > VC> > x = > 0.999999999999999555910790149937383830547332763671875000000000 > VC> > y = > VC> > 0.0000000298023223876953091912775497878893005143652317201485857367516 > VC> > (need high precision decimal or these rounded to 53 bits > binary) > VC> > x^2+y^2-1 = 1.0947644252537633366591637369e-47 > VC> VC> That is exactly 2^(-156). So maybe triple quad precision really > is enough. > > Hmm. But you need 53 more value bits after the 156. Quadruple precision > gives 3 to spare. I didn't notice that this number was exactly a power > of 2, but just added 15-17 for the value bits in decimal to 47 to get over > 60. I think one should be able to prove mathematically that if the number is as small as 1e-47, only the first one or two bits of the mantissa will be non-zero. I think that if more than triple double precision is needed, it is only one or two more bits more than triple double precision.