10.46.66 strtof
¶
POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/strtof.html
Gnulib module: strtof
Portability problems fixed by Gnulib:
- This function is missing on some platforms:
NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, HP-UX 11, Solaris 9, MSVC 9, Android 4.4.
- This function returns the wrong end pointer for ‘-0x’ on some
platforms:
glibc 2.4, Mac OS X 10.5, FreeBSD 6.2.
- This function fails to parse ‘NaN()’ on some platforms:
glibc 2.5, FreeBSD 6.2.
- This function misparses ‘nan(’ on some platforms:
macOS 10.6.6.
- This function fails to set
errno
upon overflow on some platforms:
mingw 5.0.
- This function fails to set
errno
upon underflow on some platforms:
Cygwin 2.9, mingw 5.0.
Portability problems not fixed by Gnulib:
- This function returns +0.0 (not −0.0) for negative underflow on some
platforms:
glibc 2.7, mingw, MSVC 14.
- This function cannot distinguish between “nan” and “-nan” on some
platforms:
glibc 2.7, mingw, MSVC 14.
- 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.
- This function fails to set
errno
upon gradual underflow (resulting
in a denormalized number) on some platforms:
MSVC 14.
- The replacement function does not always return correctly rounded results.
- If no conversion could be performed, this function sets
errno
to EINVAL
on some platforms. Portable programs should check
for no conversion by comparing str
to *endptr
, not by
inspecting errno
.