From: Rich Felker <dalias@libc.org>
To: Selene Corbineau <selene.corbineau@ens.psl.eu>
Cc: musl@lists.openwall.com, Paul Zimmermann <Paul.Zimmermann@inria.fr>
Subject: Re: [musl] Obsolete comment in powl, and (s)NaN handling ?
Date: Mon, 5 Aug 2024 09:18:39 -0400 [thread overview]
Message-ID: <20240805131839.GZ10433@brightrain.aerifal.cx> (raw)
In-Reply-To: <9ea8df217179a1c6c7bc0bd0d7001721@ens.psl.eu>
On Mon, Aug 05, 2024 at 02:22:34PM +0200, Selene Corbineau wrote:
> Hello,
>
> Currently, src/math/powl.c line 66 states that powl(x, y)
> returns 0 when x < 0 and y not an integer. However, lines 290-291
Indeed, that comment seems totally wrong and probably comes from some
awful legacy mode that was omitted when importing the code (no fenv or
nans, exceptional results via errno). I think that whole paragraph
should just be deleted since "error messages" are not a thing in ours
or any modern libm.
> >if (iyflg == 0)
> > return (x - x) / (x - x); /* (x<0)**(non-int) is NaN */
>
> precisely ensure this is not the case. Both these excerpts come
> from the original commit. Maybe line 66 should be deleted/corrected ?
Yes, or as above.
> Deviating a bit, are there plans for supporting signalling NaNs in
> Musl ?
No, and I wouldn't expect there to be unless at some point there were
a compelling conformance reason. The tooling all botches a lot of
stuff about handling them, and making them work right probably imposes
performance cost on the 3+ nines of software that have no interest in
them.
Rich
prev parent reply other threads:[~2024-08-05 13:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 12:22 Selene Corbineau
2024-08-05 13:18 ` Rich Felker [this message]
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=20240805131839.GZ10433@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=Paul.Zimmermann@inria.fr \
--cc=musl@lists.openwall.com \
--cc=selene.corbineau@ens.psl.eu \
/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).