Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 12 Feb 2020 15:07:17 +1100 (AEDT)
From: Damian McGuckin <damianm@....com.au>
To: musl@...ts.openwall.com
Subject: Re: casinh function accuracy problem

On Tue, 11 Feb 2020, Rich Felker wrote:

> My minimal criterion for large-scale improvements of src/complex would
> be fixing any remaining cases where inf/nan behavior is badly wrong or
> there's catastrophic error (>2^52 ulp, or even just >2^20 ulp or so).
> Beyond that, I think "reducing ulp error" would be nice but hard to
> quantify and make a goal without having an idea how bad it is now, not
> to mention without having rigorous error bounds on the real math
> library functions.

I think INF/NaN behaviour at the fundamental level is flawed.

This initialization:

 	double complex x = 1.0e+200 + INFINITY * I;

on every compiler I try, yields an 'x' of

 	NaN + INFINITY i

Whereas if I compute

 	double complex a = 2.0 + 1.0e200 * I;
 	double complex b = 1.0e200 + 1.0 * I;
 	double x = a * b;

then 'x' prints correctly as

 	1.0e+200 + INF * I;

Regards - Damian

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.