Standards / Extensions | C or C++ | Dependencies |
---|---|---|
ISO C |
both |
#include <stdlib.h>
double atof(const char *nptr);
strtod(nptr, (char**)NULL)
The double value is either hexadecimal floating point or binary floating point, depending on the floating point mode of the thread invoking the atof() function. This function uses _isBF() to determine the floating point mode of the invoking thread.
See the “fscanf Family of Formatted Input Functions” on fscanf(), scanf(), sscanf() — Read and format data for a description of special infinity and NaN sequences recognized by z/OS formatted input functions, including atof() and strtod() in IEEE Binary Floating-Point mode.
The atof() function returns the converted value if the value can be represented, otherwise the return value is undefined.