Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Aug 2012 23:13:10 -0000
From:      Stephen Montgomery-Smith <stephen@missouri.edu>
To:        Peter Jeremy <peter@rulingia.com>
Cc:        Diane Bruce <db@db.net>, Bruce Evans <brde@optusnet.com.au>, John Baldwin <jhb@freebsd.org>, David Chisnall <theraven@freebsd.org>, Bruce Evans <bde@freebsd.org>, Steve Kargl <sgk@troutmask.apl.washington.edu>, David Schultz <das@freebsd.org>, Warner Losh <imp@bsdimp.com>
Subject:   Re: Use of C99 extra long double math functions after r236148
Message-ID:  <500A3EB1.9040806@missouri.edu>
Resent-Message-ID: <20120812231302.GY20453@server.rulingia.com>
In-Reply-To: <20120721043052.GB73662@server.rulingia.com>
References:  <20120719205347.T2601@besplex.bde.org> <50084322.7020401@missouri.edu> <20120720035001.W4053@besplex.bde.org> <50085441.4090305@missouri.edu> <20120720162953.N2162@besplex.bde.org> <20120720184114.B2790@besplex.bde.org> <50097128.6030405@missouri.edu> <20120721032448.X5744@besplex.bde.org> <500A0DCF.4030707@missouri.edu> <500A139D.2090803@missouri.edu> <20120721043052.GB73662@server.rulingia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/20/2012 11:30 PM, Peter Jeremy wrote:
> On 2012-Jul-20 21:27:41 -0500, Stephen Montgomery-Smith <stephen@missouri.edu> wrote:
>> The way they handle the real part of clog(z), log(hypot(x,y)), when
>> hypot(x,y) is close to 1, is to do the calculation in double precision.
>>   So to do it properly, we need a double double precision arithmetic,
>> which we don't have.
>
> Actually, we do.  r230363 includes both extended and quad long-double
> emulation code in lib/libc/softfloat.  There's also ld128 code under
> lib/libc/sparc64/fpu.

Does the double-double precision arithmetic include sqrt?  If that is 
the case, I might be able to make short work of casinh.  Looking at the 
Hull paper, one hard part is computing

hypot(x-1,y) + hypot(x+1,y) - 2

that is

|z-1| + |z+1| - 2

to great accuracy.  And after thinking about it for a while, you realize 
that when z is close to the interval [-1,1], getting this calculation 
done with any accuracy is really hard.

I think if I could do this calculation in double-double precision, then 
I would get all the accuracy I need.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?500A3EB1.9040806>