1atof(3) Library Functions Manual atof(3)
2
3
4
6 atof - convert a string to a double
7
9 Standard C library (libc, -lc)
10
12 #include <stdlib.h>
13
14 double atof(const char *nptr);
15
17 The atof() function converts the initial portion of the string pointed
18 to by nptr to double. The behavior is the same as
19
20 strtod(nptr, NULL);
21
22 except that atof() does not detect errors.
23
25 The converted value.
26
28 For an explanation of the terms used in this section, see at‐
29 tributes(7).
30
31 ┌─────────────────────────────────────┬───────────────┬────────────────┐
32 │Interface │ Attribute │ Value │
33 ├─────────────────────────────────────┼───────────────┼────────────────┤
34 │atof() │ Thread safety │ MT-Safe locale │
35 └─────────────────────────────────────┴───────────────┴────────────────┘
36
38 C11, POSIX.1-2008.
39
41 POSIX.1-2001, C89, C99, SVr4, 4.3BSD.
42
44 atoi(3), atol(3), strfromd(3), strtod(3), strtol(3), strtoul(3)
45
46
47
48Linux man-pages 6.04 2023-03-30 atof(3)