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 └──────────┴───────────────┴────────────────┘
34 POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
35
37 atoi(3), atol(3), strfromd(3), strtod(3), strtol(3), strtoul(3)
38
40 This page is part of release 5.10 of the Linux man-pages project. A
41 description of the project, information about reporting bugs, and the
42 latest version of this page, can be found at
43 https://www.kernel.org/doc/man-pages/.
44
45
46
47GNU 2016-12-12 ATOF(3)