public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* NaN fixes in pow, powf, modf, modff
@ 2020-03-26  0:18 Keith Packard
  2020-03-26  0:18 ` [PATCH 1/3] newlib/libm/common: Fix modf/modff returning snan Keith Packard
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Keith Packard @ 2020-03-26  0:18 UTC (permalink / raw)
  To: newlib

The first patch makes modf set *iptr to qnan when provided an snan
parameter, which wasn't happening on ARM softfp because GCC elided the
* 1.0 operation.

The second patch cleans up modf/modff by not re-converting the float
to bits before extracting the sign bit.

The third patch makes pow return qnan instead of 1.0 when the
parameter is snan.

These functions now match glibc for all of my tests, which were
derived from the IEEE requirements.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-03-26 11:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26  0:18 NaN fixes in pow, powf, modf, modff Keith Packard
2020-03-26  0:18 ` [PATCH 1/3] newlib/libm/common: Fix modf/modff returning snan Keith Packard
2020-03-26  0:18 ` [PATCH 2/3] newlib/libm/common: Don't re-convert float to bits in modf/modff Keith Packard
2020-03-26  0:18 ` [PATCH 3/3] newlib/libm/math: Make pow/powf return qnan for snan arg Keith Packard
2020-03-26 11:42 ` NaN fixes in pow, powf, modf, modff Corinna Vinschen

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 read-only IMAP folder(s) and NNTP newsgroup(s).