10.46.68 strtold
¶
POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/strtold.html
Gnulib module: strtold
Portability problems fixed by Gnulib:
- This function is missing on some platforms:
NetBSD 3.0, OpenBSD 3.8, Minix 3.1.8, Solaris 9, older Cygwin 1.7.x, MSVC 9, Android 4.4.
- This function returns a struct, not a
long double
, on some platforms:
HP-UX 11.31/hppa.
- This function always returns a wrong value on some platforms:
mingw 5.0.
- This function allows whitespace between ‘e’ and the exponent on
some platforms:
HP-UX 11.31/ia64.
- This function returns the wrong end pointer for ‘-0x’ on some
platforms:
glibc-2.3.2, Mac OS X 10.5, Haiku.
- This function fails to parse Infinities and plain NaNs on some platforms:
HP-UX 11.31/ia64.
- This function fails to parse ‘NaN()’ on some platforms:
glibc-2.3.2, mingw, Haiku.
- This function parses ‘NaN(n-char-sequence)’, but returns
the wrong end pointer on some platforms:
glibc-2.3.2, mingw, Haiku.
- This function fails to parse C99 hexadecimal floating point on some
platforms:
mingw.
- In hexadecimal floats, this function allows whitespace between ‘p’
and the exponent on some platforms:
HP-UX 11.31/ia64.
- This function fails to set
errno
upon underflow on some platforms:
Cygwin 2.9.
- This function maps denormalized numbers to zero on some platforms:
Haiku 2024.
- This function leaks memory on mingw 5.0
and allocates an unbounded amount of stack on mingw 9.0.
Portability problems not fixed by Gnulib:
- 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
.