From owner-freebsd-current@FreeBSD.ORG Wed Jul 25 17:31:48 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 604DA1065675; Wed, 25 Jul 2012 17:31:48 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 374E28FC15; Wed, 25 Jul 2012 17:31:48 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id q6PHVlFF072836; Wed, 25 Jul 2012 10:31:47 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id q6PHVlDX072835; Wed, 25 Jul 2012 10:31:47 -0700 (PDT) (envelope-from sgk) Date: Wed, 25 Jul 2012 10:31:47 -0700 From: Steve Kargl To: Stephen Montgomery-Smith Message-ID: <20120725173147.GA72824@troutmask.apl.washington.edu> References: <210816F0-7ED7-4481-ABFF-C94A700A3EA0@bsdimp.com> <20120708233624.GA53462@troutmask.apl.washington.edu> <4FFBF16D.2030007@gwdg.de> <2A1DE516-ABB4-49D7-8C3D-2C4DA2D9FCF5@bsdimp.com> <4FFC412B.4090202@gwdg.de> <20120710151115.GA56950@zim.MIT.EDU> <4FFC5E5D.8000502@gwdg.de> <20120710225801.GB58778@zim.MIT.EDU> <50101EDE.6030509@gwdg.de> <50102C8F.2080901@missouri.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50102C8F.2080901@missouri.edu> User-Agent: Mutt/1.4.2.3i Cc: David Schultz , Bruce Evans , freebsd-current@freebsd.org Subject: Re: Use of C99 extra long double math functions after r236148 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2012 17:31:48 -0000 On Wed, Jul 25, 2012 at 12:27:43PM -0500, Stephen Montgomery-Smith wrote: > On 07/25/12 11:29, Rainer Hurling wrote: > > >Many thanks to you three for implementing expl() with r238722 and r238724. > > > >I am not a C programmer, but would like to ask if the following example > >is correct and suituable as a minimalistic test of this new C99 function? > > > > (program deleted) > > > >Compiled with 'c99 -o math_expl math_expl.c -lm' and running afterwards > >it gives me: > > > >exp(2.000000) is > >7.3890560989306504069 > > > >expl(2.000000) is > >7.38905609893065022739794 > > > > Just as a point of comparison, here is the answer computed using > Mathematica: > > N[Exp[2], 50] > 7.3890560989306502272304274605750078131803155705518 > > As you can see, the expl solution has only a few digits more accuracy > that exp. Unless you are using sparc64 hardware. flame:kargl[204] ./testl -V 2 ULP = 0.2670 for x = 2.000000000000000000000000000000000e+00 mpfr exp: 7.389056098930650227230427460575008e+00 libm exp: 7.389056098930650227230427460575008e+00 -- Steve