]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/atof.3
b82c1f499477cba5660d89c10b29c6f42e17ab7f
[thirdparty/man-pages.git] / man3 / atof.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .\" References consulted:
6 .\" Linux libc source code
7 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
8 .\" 386BSD man pages
9 .\" Modified Mon Mar 29 22:39:24 1993, David Metcalfe
10 .\" Modified Sat Jul 24 21:39:22 1993, Rik Faith (faith@cs.unc.edu)
11 .TH atof 3 (date) "Linux man-pages (unreleased)"
12 .SH NAME
13 atof \- convert a string to a double
14 .SH LIBRARY
15 Standard C library
16 .RI ( libc ", " \-lc )
17 .SH SYNOPSIS
18 .nf
19 .B #include <stdlib.h>
20 .PP
21 .BI "double atof(const char *" nptr );
22 .fi
23 .SH DESCRIPTION
24 The
25 .BR atof ()
26 function converts the initial portion of the string
27 pointed to by \fInptr\fP to
28 .IR double .
29 The behavior is the same as
30 .PP
31 .in +4n
32 .EX
33 strtod(nptr, NULL);
34 .EE
35 .in
36 .PP
37 except that
38 .BR atof ()
39 does not detect errors.
40 .SH RETURN VALUE
41 The converted value.
42 .SH ATTRIBUTES
43 For an explanation of the terms used in this section, see
44 .BR attributes (7).
45 .ad l
46 .nh
47 .TS
48 allbox;
49 lbx lb lb
50 l l l.
51 Interface Attribute Value
52 T{
53 .BR atof ()
54 T} Thread safety MT-Safe locale
55 .TE
56 .hy
57 .ad
58 .sp 1
59 .SH STANDARDS
60 POSIX.1-2001, POSIX.1-2008, 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)