summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/strtod.3
diff options
context:
space:
mode:
authoraaron <>2000-04-20 13:50:03 +0000
committeraaron <>2000-04-20 13:50:03 +0000
commita4336f357f9e30dffdfad4909b24bd2e82c096a2 (patch)
treec79a224a41eb2c48668c4b4eda84163d7daadf64 /src/lib/libc/stdlib/strtod.3
parent92b3e44bedaf5a5f85880565a47206cdbf9bfa2a (diff)
downloadopenbsd-a4336f357f9e30dffdfad4909b24bd2e82c096a2.tar.gz
openbsd-a4336f357f9e30dffdfad4909b24bd2e82c096a2.tar.bz2
openbsd-a4336f357f9e30dffdfad4909b24bd2e82c096a2.zip
Flesh out stdlib function man pages.
Diffstat (limited to 'src/lib/libc/stdlib/strtod.3')
-rw-r--r--src/lib/libc/stdlib/strtod.325
1 files changed, 14 insertions, 11 deletions
diff --git a/src/lib/libc/stdlib/strtod.3 b/src/lib/libc/stdlib/strtod.3
index 143fea34dc..4e04f6738e 100644
--- a/src/lib/libc/stdlib/strtod.3
+++ b/src/lib/libc/stdlib/strtod.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: strtod.3,v 1.6 2000/03/04 22:19:31 aaron Exp $ 36.\" $OpenBSD: strtod.3,v 1.7 2000/04/20 13:50:03 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRTOD 3 39.Dt STRTOD 3
@@ -50,18 +50,23 @@ string to double
50.Sh DESCRIPTION 50.Sh DESCRIPTION
51The 51The
52.Fn strtod 52.Fn strtod
53function converts the initial portion of the string 53function converts the initial portion of the string pointed to by
54pointed to by
55.Fa nptr 54.Fa nptr
56to 55to
57.Li double 56.Li double
58representation. 57representation.
59.Pp 58.Pp
60The expected form of the string is an optional plus (``+'') or minus 59The expected form of the string is an optional plus
61sign (``-'') followed by a sequence of digits optionally containing 60.Pq Ql +
61or minus sign
62.Pq Ql -
63followed by a sequence of digits optionally containing
62a decimal-point character, optionally followed by an exponent. 64a decimal-point character, optionally followed by an exponent.
63An exponent consists of an ``E'' or ``e'', followed by an optional plus 65An exponent consists of an
64or minus sign, followed by a sequence of digits. 66.Sq E
67or
68.Sq e ,
69followed by an optional plus or minus sign, followed by a sequence of digits.
65.Pp 70.Pp
66Leading whitespace characters in the string (as defined by the 71Leading whitespace characters in the string (as defined by the
67.Xr isspace 3 72.Xr isspace 3
@@ -90,8 +95,7 @@ is returned (according to the sign of the value), and
90.Er ERANGE 95.Er ERANGE
91is stored in 96is stored in
92.Va errno . 97.Va errno .
93If the correct value would cause underflow, zero is 98If the correct value would cause underflow, zero is returned and
94returned and
95.Er ERANGE 99.Er ERANGE
96is stored in 100is stored in
97.Va errno . 101.Va errno .
@@ -109,6 +113,5 @@ Overflow or underflow occurred.
109.Sh STANDARDS 113.Sh STANDARDS
110The 114The
111.Fn strtod 115.Fn strtod
112function 116function conforms to
113conforms to
114.St -ansiC . 117.St -ansiC .