strtod(3) Library Functions Manual strtod(3) strtod, strtof, strtold - ASCII (libc -lc) #include double strtod(const char *restrict nptr, char **_Nullable restrict endptr); float strtof(const char *restrict nptr, char **_Nullable restrict endptr); long double strtold(const char *restrict nptr, char **_Nullable restrict endptr); glibc ( feature_test_macros(7)): strtof(), strtold(): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L strtod() strtof() strtold() nptr double float long double . isspace(3) ('+') ('-') (i) (ii) (iii) (iv) NAN ( ). ( '.') . 'E' 'e' 10. "0x" "0X" . 'P' 'p' 2. . "INF" "INFINITY" . NAN "NAN" ( ) (n-char-sequence) n-char-sequence NAN ( ). . endptr NULL endptr. ( endptr ) nptr endptr. HUGE_VAL HUGE_VALF HUGE_VALL ( ) ERANGE errno. DBL_MIN FLT_MIN LDBL_MIN ERANGE errno. ERANGE . attributes(7). +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ | | | | +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ |strtod(), strtof(), | | (locale) (MT-Safe) | |strtold() | | | +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ glibc n-char-sequence "NAN" ( '0' '0x' 8 16) . C11, POSIX.1-2008. strtod() C89, POSIX.1-2001. strtof() strtold() C99 POSIX.1-2001. 0 errno 0 errno . strtol(3) . atof(3), atoi(3), atol(3), nan(3), nanf(3), nanl(3), strfromd(3), strtol(3), strtoul(3) 3 . . : . 6.18 17 2025 strtod(3)