mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Damian McGuckin <damianm@esi.com.au>
To: musl@lists.openwall.com
Subject: Re: [musl] casinh function accuracy problem
Date: Wed, 12 Feb 2020 15:07:17 +1100 (AEDT)	[thread overview]
Message-ID: <alpine.LRH.2.02.2002121450170.16988@key0.esi.com.au> (raw)
In-Reply-To: <20200212020023.GV1663@brightrain.aerifal.cx>

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

  reply	other threads:[~2020-02-12  4:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 15:51 mg1633068
2020-02-11 19:30 ` Szabolcs Nagy
2020-02-11 23:24   ` Rich Felker
2020-02-12  0:46     ` Damian McGuckin
2020-02-12  2:00       ` Rich Felker
2020-02-12  4:07         ` Damian McGuckin [this message]
2020-02-12  4:19           ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LRH.2.02.2002121450170.16988@key0.esi.com.au \
    --to=damianm@esi.com.au \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).