* [musl] Obsolete comment in powl, and (s)NaN handling ?
@ 2024-08-05 12:22 Selene Corbineau
2024-08-05 13:18 ` Rich Felker
0 siblings, 1 reply; 2+ messages in thread
From: Selene Corbineau @ 2024-08-05 12:22 UTC (permalink / raw)
To: musl; +Cc: Paul Zimmermann
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
> 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 ?
Deviating a bit, are there plans for supporting signalling NaNs in Musl
?
Thanks in advance,
Sélène
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [musl] Obsolete comment in powl, and (s)NaN handling ?
2024-08-05 12:22 [musl] Obsolete comment in powl, and (s)NaN handling ? Selene Corbineau
@ 2024-08-05 13:18 ` Rich Felker
0 siblings, 0 replies; 2+ messages in thread
From: Rich Felker @ 2024-08-05 13:18 UTC (permalink / raw)
To: Selene Corbineau; +Cc: musl, Paul Zimmermann
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-05 13:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-05 12:22 [musl] Obsolete comment in powl, and (s)NaN handling ? Selene Corbineau
2024-08-05 13:18 ` Rich Felker
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).