Debian Codegraph @

upstream/debian-trixie/man3/atof.3

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