]>
Commit | Line | Data |
---|---|---|
a1eaacb1 | 1 | '\" t |
fea681da MK |
2 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
3 | .\" | |
5fbde956 | 4 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
fea681da MK |
5 | .\" |
6 | .\" References consulted: | |
7 | .\" Linux libc source code | |
8 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
9 | .\" 386BSD man pages | |
10 | .\" Modified Mon Mar 29 22:39:24 1993, David Metcalfe | |
11 | .\" Modified Sat Jul 24 21:39:22 1993, Rik Faith (faith@cs.unc.edu) | |
4c1c5274 | 12 | .TH atof 3 (date) "Linux man-pages (unreleased)" |
fea681da MK |
13 | .SH NAME |
14 | atof \- convert a string to a double | |
b813014f AC |
15 | .SH LIBRARY |
16 | Standard C library | |
17 | .RI ( libc ", " \-lc ) | |
fea681da MK |
18 | .SH SYNOPSIS |
19 | .nf | |
20 | .B #include <stdlib.h> | |
68e4db0a | 21 | .PP |
fea681da MK |
22 | .BI "double atof(const char *" nptr ); |
23 | .fi | |
24 | .SH DESCRIPTION | |
60a90ecd MK |
25 | The |
26 | .BR atof () | |
27 | function converts the initial portion of the string | |
6d275e3c MK |
28 | pointed to by \fInptr\fP to |
29 | .IR double . | |
d9bfdb9c | 30 | The behavior is the same as |
ba39b288 | 31 | .PP |
2147452b | 32 | .in +4n |
ba39b288 | 33 | .EX |
13f78d96 | 34 | strtod(nptr, NULL); |
ba39b288 | 35 | .EE |
2147452b | 36 | .in |
ba39b288 | 37 | .PP |
60a90ecd MK |
38 | except that |
39 | .BR atof () | |
40 | does not detect errors. | |
47297adb | 41 | .SH RETURN VALUE |
fea681da | 42 | The converted value. |
b5dedda7 | 43 | .SH ATTRIBUTES |
929a50b5 MK |
44 | For an explanation of the terms used in this section, see |
45 | .BR attributes (7). | |
46 | .TS | |
47 | allbox; | |
c466875e | 48 | lbx lb lb |
929a50b5 MK |
49 | l l l. |
50 | Interface Attribute Value | |
51 | T{ | |
9e54434e BR |
52 | .na |
53 | .nh | |
b5dedda7 | 54 | .BR atof () |
929a50b5 MK |
55 | T} Thread safety MT-Safe locale |
56 | .TE | |
c466875e | 57 | .sp 1 |
3113c7f3 | 58 | .SH STANDARDS |
4131356c AC |
59 | C11, POSIX.1-2008. |
60 | .SH HISTORY | |
61 | POSIX.1-2001, C89, C99, SVr4, 4.3BSD. | |
47297adb | 62 | .SH SEE ALSO |
fea681da MK |
63 | .BR atoi (3), |
64 | .BR atol (3), | |
afaf39e9 | 65 | .BR strfromd (3), |
fea681da MK |
66 | .BR strtod (3), |
67 | .BR strtol (3), | |
68 | .BR strtoul (3) |