English
Language : 

CC78K4 Datasheet, PDF (209/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 10 LIBRARY FUNCTIONS
5-12 atof
strtod
Utility Functions
EXPLANATION
atof
• atof converts the character string that is pointed by the pointer nptr to double.
• Skips 0 or more strings of null characters (a character which makes isspace true) from the start and converts
the character string (other than decimal characters or until the last null character appears) from the character
next to the floating-point number.
• If the conversion is performed correctly, a floating point number is returned.
• If an overflow occurs in the conversion, HUGE_VAL, which has the sign of the overflowed value, is returned,
and ERANGE is set to errno.
• If annihilation of valid digits occurs due to underflow or overflow, a non-normalized number and ±0 are
returned, respectively, and ERANGE is set to errno.
• If a conversion cannot be performed, 0 is returned.
strtod
• strtod converts the character string that is pointed by the pointer nptr to double.
• Skips 0 or more strings of null characters (a character which makes isspace true) from the start and converts
the character string (other than decimal characters or until the last null character appears) from the character
next to the floating-point number.
• If the conversion is performed correctly, a floating-point number is returned.
• If an overflow occurs in the conversion, HUGE_VAL, which has the sign of the overflowed value, is returned,
and ERANGE is set to errno.
• If annihilation of valid digits occurs due to underflow or overflow, a non-normalized number and ±0 are
returned, respectively, and ERANGE is set to errno. At the same time, endptr stores the pointer in the next
character string.
• If conversion cannot be performed, 0 is returned.
User’s Manual U15556EJ1V0UM
209