#include <stdlib.h>
double strtod(const char * __restrict__nptr, char ** __restrict__endptr);
The strtod() function converts part of a character string, pointed to by nptr, to a double. The parameter nptr points to a sequence of characters that can be interpreted as a numerical value of the type double.
The strtod() function breaks the string into three parts:
The subject string is the longest string that matches the expected form.
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, strtod() returns the value of the floating-point number in IEEE Binary Floating-Point format.
In an overflow, strtod() returns +/-HUGE_VAL. In an underflow, it returns 0. If no conversion is performed, strtod() returns 0.