Hi Bruno.

On Sat, May 02, 2026 at 03:29:36PM +0200, Bruno Haible wrote:
> Hi Mohammad,
> 
> I wrote:
> > I'll work on a strtof, strtod, strtold override...
> 
> Done:
> 
> 
> 2026-05-02  Bruno Haible  <[email protected]>
> 
>       strtof, strtod, strtold: Return NaNs with correct sign.
>       Reported by Mohammad-Reza Nabipoor <[email protected]> in
>       <https://lists.gnu.org/archive/html/bug-gnulib/2026-04/msg00136.html>.
>       * m4/strtof.m4 (gl_FUNC_STRTOF): Add test whether strtod works on signed
>       NaNs.
>       * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
>       * m4/strtold.m4 (gl_FUNC_STRTOLD): Likewise.
>       * lib/strtod.c: Include isnan?-nolibm.h.
>       (HAS_MINUS_NAN_BUG): New macro.
>       (STRTOD): Add separate implementation for HAS_MINUS_NAN_BUG.
>       * modules/strtof (Files): Add m4/signbit.m4.
>       (Depends-on): Add isnanf-nolibm, signbit-no-c++.
>       * modules/strtod (Files): Add m4/signbit.m4.
>       (Depends-on): Add isnand-nolibm, signbit-no-c++.
>       * modules/strtold (Files): Add m4/signbit.m4.
>       (Depends-on): Add isnanl-nolibm, signbit-no-c++.
>       * tests/test-strtof.h (test_function): Enable the test of sign bits of
>       NaN.
>       * tests/test-strtod.h (test_function): Likewise.
>       * tests/test-strtold.h (test_function): Likewise.
>       * doc/posix-functions/strtof.texi: Document the bug regarding "-nan".
>       * doc/posix-functions/strtod.texi: Likewise.
>       * doc/posix-functions/strtold.texi: Likewise.
> 


Thank you!

Reply via email to