1ATOF(3) Linux Programmer's Manual ATOF(3)
2
3
4
6 atof - convert a string to a double
7
9 #include <stdlib.h>
10
11 double atof(const char *nptr);
12
14 The atof() function converts the initial portion of the string pointed
15 to by nptr to double. The behavior is the same as
16
17 strtod(nptr, NULL);
18
19 except that atof() does not detect errors.
20
22 The converted value.
23
25 For an explanation of the terms used in this section, see at‐
26 tributes(7).
27
28 ┌─────────────────────────────────────┬───────────────┬────────────────┐
29 │Interface │ Attribute │ Value │
30 ├─────────────────────────────────────┼───────────────┼────────────────┤
31 │atof() │ Thread safety │ MT-Safe locale │
32 └─────────────────────────────────────┴───────────────┴────────────────┘
33
35 POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
36
38 atoi(3), atol(3), strfromd(3), strtod(3), strtol(3), strtoul(3)
39
41 This page is part of release 5.12 of the Linux man-pages project. A
42 description of the project, information about reporting bugs, and the
43 latest version of this page, can be found at
44 https://www.kernel.org/doc/man-pages/.
45
46
47
48GNU 2021-03-22 ATOF(3)