Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Aug 2012 23:14:06 -0000
From:      Stephen Montgomery-Smith <stephen@missouri.edu>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        Diane Bruce <db@db.net>, 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>, Peter Jeremy <peter@rulingia.com>, Warner Losh <imp@bsdimp.com>
Subject:   Re: Use of C99 extra long double math functions after r236148
Message-ID:  <5008DBC2.4040304@missouri.edu>
Resent-Message-ID: <20120812231359.GH20453@server.rulingia.com>
In-Reply-To: <20120720120802.F1061@besplex.bde.org>
References:  <20120529045612.GB4445@server.rulingia.com> <20120711223247.GA9964@troutmask.apl.washington.edu> <20120713114100.GB83006@server.rulingia.com> <201207130818.38535.jhb@freebsd.org> <9EB2DA4F-19D7-4BA5-8811-D9451CB1D907@theravensnest.org> <C527B388-3537-406F-BA6D-2FA45B9EAA3B@FreeBSD.org> <20120713155805.GC81965@zim.MIT.EDU> <20120714120432.GA70706@server.rulingia.com> <20120717084457.U3890@besplex.bde.org> <5004A5C7.1040405@missouri.edu> <5004DEA9.1050001@missouri.edu> <20120717200931.U6624@besplex.bde.org> <5006D13D.2080702@missouri.edu> <20120719144432.N1596@besplex.bde.org> <50083E83.9090404@missouri.edu> <20120720120802.F1061@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/19/2012 09:19 PM, Bruce Evans wrote:
> On Thu, 19 Jul 2012, Stephen Montgomery-Smith wrote:

>
>> I can now see that the separate cases of the real part and imaginary
>> parts of casinh being zero is going to be hard.
>
> I won't ask for that and will measure errors relative to the absolute value
> of the result.

But the algorithm in the paper by Hull et al (the paper recommended by 
Jeremy) manages to do this very effectively.  So I will abandon my 
algorithm, and use Hull et al's algorithms.

The real part of casinh(z) is zero only if z=I*y, |y|<=1, and the 
imaginary part of casinh(z) is zero only if z is real.  This is much 
easier to quantify in floating point terms than the condition for 
clog(z) to be pure imaginary (|z|=1).  Once you realize this, you see 
that it makes sense to compute casinh(z) by considering the real and 
imaginary parts separately.  And this is exactly what Hull et al does.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5008DBC2.4040304>