Hash :
01a485ed
Author :
Date :
2024-02-21T22:45:47
strtof: New module. * lib/stdlib.in.h (strtof): New declaration. * lib/strtod.c: Support USE_FLOAT. * lib/strtof.c: New file. * m4/strtof.m4: New file, based on m4/strtod.m4. * m4/ldexpf.m4 (gl_CHECK_LDEXPF_NO_LIBM): New macro, based on m4/ldexp.m4. * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_STRTOF. * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOF, HAVE_STRTOF, REPLACE_STRTOF. * modules/strtof: New file. * tests/test-stdlib-c++.cc (strtof): Check signature. * doc/posix-functions/strtof.texi: Mention the new module and the bugs that it fixes. (gl_STDLIB_H_DEFAULTS): Initialize HAVE_STRTOF, REPLACE_STRTOF.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
@node strtof
@section @code{strtof}
@findex strtof
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/strtof.html}
Gnulib module: strtof
Portability problems fixed by Gnulib:
@itemize
@item
This function is missing on some platforms:
NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, IRIX 6.5, Solaris 9, MSVC 9, Android 4.4.
@item
This function returns the wrong end pointer for @samp{-0x} on some
platforms:
glibc 2.4, Mac OS X 10.5, FreeBSD 6.2.
@item
This function fails to parse @samp{NaN()} on some platforms:
glibc-2.5, FreeBSD 6.2.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This function returns +0.0 (not @minus{}0.0) for negative underflow on some
platforms:
glibc 2.7, mingw, MSVC 14.
@item
This function cannot distinguish between ``nan'' and ``-nan'' on some
platforms:
glibc 2.7, mingw, MSVC 14.
@item
This function fails to correctly parse very long strings on some
platforms:
Mac OS X 10.5, FreeBSD 6.2, NetBSD 5.0, Cygwin, mingw, MSVC 14.
@item
The replacement function does not always return correctly rounded results.
@end itemize