Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240805131839.GZ10433@brightrain.aerifal.cx>
Date: Mon, 5 Aug 2024 09:18:39 -0400
From: Rich Felker <dalias@...c.org>
To: Selene Corbineau <selene.corbineau@....psl.eu>
Cc: musl@...ts.openwall.com, Paul Zimmermann <Paul.Zimmermann@...ia.fr>
Subject: Re: Obsolete comment in powl, and (s)NaN handling ?

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

Powered by blists - more mailing lists

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