STRTOLD(3C)
NAME
strtold − convert string to long double-precision number
SYNOPSIS
#include <stdlib.h>
long_double strtold (str, ptr)
char ∗str, ∗∗ptr;
DESCRIPTION
The function strtold returns as a long double-precision number the value represented by the character string pointed to by str. The string is scanned up to the first unrecognized character.
strtold recognizes an optional string of “white-space” characters (as defined by isspace in ctype(3C)), then an optional sign, then a string of digits optionally containing a radix character, then an optional e or E followed by an optional sign or space, followed by an integer. The radix character is determined by the loaded NLS environment (see nl_init(3C)). If nl_init has not been called successfully, the default NLS environment, "C" (see langid(5)), is used. The default environment specifies a period (.) as the radix character.
If the value of ptr is not (char ∗∗)NULL, the variable to which it points is set to point at the character after the last number, if any, that was recognized. If no number can be formed, ∗ptr is set to str, and zero is returned.
DIAGNOSTICS
If the correct value would cause overflow, ±_MAXLDBL is returned (according to the sign of the value), and errno is set to ERANGE.
If the correct value would cause underflow, zero is returned and errno is set to ERANGE.
AUTHOR
strtold was developed by HP.
SEE ALSO
ctype(3C), nl_init(3C), scanf(3S), hpnls(5), langid(5).
EXTERNAL INFLUENCES
International Code Set Support
Single-byte character code sets are supported.
Hewlett-Packard Company — HP-UX Release 7.0: Sept 1989