@node strtold
@subsection @code{strtold}
@findex strtold

POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/functions/strtold.html}

Gnulib module: strtold
@mindex strtold

Portability problems fixed by Gnulib:
@itemize
@item
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.

@item
This function returns a struct, not a @code{long double}, on some platforms:
HP-UX 11.31/hppa.

@item
This function always returns a wrong value on some platforms:
mingw 5.0.

@item
This function allows whitespace between @samp{e} and the exponent on
some platforms:
HP-UX 11.31/ia64.

@item
This function returns the wrong end pointer for @samp{-0x} on some
platforms:
glibc-2.3.2, Mac OS X 10.5, Haiku.

@item
This function fails to parse Infinities and plain NaNs on some platforms:
HP-UX 11.31/ia64.

@item
This function fails to parse @samp{NaN()} on some platforms:
glibc-2.3.2, mingw, Haiku.

@item
This function parses @samp{NaN(@var{n-char-sequence})}, but returns
the wrong end pointer on some platforms:
glibc-2.3.2, mingw, Haiku.

@item
This function fails to parse C99 hexadecimal floating point on some
platforms:
mingw.

@item
In hexadecimal floats, this function allows whitespace between @samp{p}
and the exponent on some platforms:
HP-UX 11.31/ia64.

@item
@c The term "underflow", as defined by ISO C23 § 7.12.1.(6), includes both
@c "gradual underflow" (result is a denormalized number) and "flush-to-zero
@c underflow" (result is zero).
This function fails to set @code{errno} upon underflow on some platforms:
@c https://cygwin.com/ml/cygwin/2019-12/msg00072.html
Cygwin 2.9.

@item
This function maps denormalized numbers to zero on some platforms:
@c https://dev.haiku-os.org/ticket/19040
Haiku 2024.

@item
This function leaks memory on mingw 5.0
and allocates an unbounded amount of stack on mingw 9.0.
@end itemize

Portability problems not fixed by Gnulib:
@itemize
@item
This function fails to set @code{errno} upon gradual underflow (resulting
in a denormalized number) on some platforms:
MSVC 14.

@item
The replacement function does not always return correctly rounded results.

@item
If no conversion could be performed, this function sets @code{errno}
to @code{EINVAL} on some platforms.  Portable programs should check
for no conversion by comparing @code{str} to @code{*endptr}, not by
inspecting @code{errno}.
@end itemize
