Debian Codegraph @

upstream/debian-unstable/man3/atof.3

raw
1 '\" t
2 .\" Copyright 1993, David Metcalfe <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH atof 3 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 atof \- convert a string to a double
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .B #include <stdlib.h>
16 .P
17 .BI "double atof(const char *" nptr );
18 .fi
19 .SH DESCRIPTION
20 The
21 .BR atof ()
22 function converts the initial portion of the string
23 pointed to by
24 .I nptr
25 to
26 .IR double .
27 The behavior is the same as
28 .P
29 .in +4n
30 .EX
31 strtod(nptr, NULL);
32 .EE
33 .in
34 .P
35 except that
36 .BR atof ()
37 does not detect errors.
38 .SH RETURN VALUE
39 The converted value.
40 .SH ATTRIBUTES
41 For an explanation of the terms used in this section, see
42 .BR attributes (7).
43 .TS
44 allbox;
45 lbx lb lb
46 l l l.
47 Interface Attribute Value
48 T{
49 .na
50 .nh
51 .BR atof ()
52 T} Thread safety MT-Safe locale
53 .TE
54 .SH STANDARDS
55 C11, POSIX.1-2008.
56 .SH HISTORY
57 POSIX.1-2001, C89, C99, SVr4, 4.3BSD.
58 .SH SEE ALSO
59 .BR atoi (3),
60 .BR atol (3),
61 .BR strfromd (3),
62 .BR strtod (3),
63 .BR strtol (3),
64 .BR strtoul (3)