Use of C99 extra long double math functions after r236148
Stephen Montgomery-Smith
stephen at missouri.edu
Sun Aug 12 23:14:06 UTC 2012
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.
More information about the freebsd-numerics
mailing list