#include <stdlib.h>
long double strtold(const char *__restrict__ nptr, char **__restrict__ endptr);
The strtold() function converts part of a character string, pointed to by nptr, to long double. The parameter nptr points to a sequence of characters that can be interpreted as a numerical value of the type long double.
The strtold() function breaks the string into three parts:
The function then attempts to convert the subject string into the floating-point number, and returns the result.
See sscanf() — Read and Format Data for a description of special infinity and NAN sequences recognized by z/OS® Metal C.
The pointer to the last string that was successfully converted is stored in the object pointed to by endptr, if endptr is not a NULL pointer. If the subject string is empty or it does not have the expected form, no conversion is performed. The value of nptr is stored in the object pointed to by endptr.
If successful, strtold() returns the value of the floating-point number in IEEE Binary Floating-Point format.
In an overflow, strtold() returns +/-HUGE_VAL. In an underflow, it returns 0. If no conversion is performed, strtold() returns 0.