diff options
Diffstat (limited to 'src/lib/libc/stdlib/strtod.3')
-rw-r--r-- | src/lib/libc/stdlib/strtod.3 | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/lib/libc/stdlib/strtod.3 b/src/lib/libc/stdlib/strtod.3 index 0b7f973857..4e04f6738e 100644 --- a/src/lib/libc/stdlib/strtod.3 +++ b/src/lib/libc/stdlib/strtod.3 | |||
@@ -33,8 +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 | .\" from: @(#)strtod.3 5.3 (Berkeley) 6/29/91 | 36 | .\" $OpenBSD: strtod.3,v 1.7 2000/04/20 13:50:03 aaron Exp $ |
37 | .\" $Id: strtod.3,v 1.1.1.1 1995/10/18 08:42:19 deraadt Exp $ | ||
38 | .\" | 37 | .\" |
39 | .Dd June 29, 1991 | 38 | .Dd June 29, 1991 |
40 | .Dt STRTOD 3 | 39 | .Dt STRTOD 3 |
@@ -51,20 +50,25 @@ string to double | |||
51 | .Sh DESCRIPTION | 50 | .Sh DESCRIPTION |
52 | The | 51 | The |
53 | .Fn strtod | 52 | .Fn strtod |
54 | function converts the initial portion of the string | 53 | function converts the initial portion of the string pointed to by |
55 | pointed to by | ||
56 | .Fa nptr | 54 | .Fa nptr |
57 | to | 55 | to |
58 | .Em double | 56 | .Li double |
59 | representation. | 57 | representation. |
60 | .Pp | 58 | .Pp |
61 | The expected form of the string is an optional plus (``+'') or minus | 59 | The expected form of the string is an optional plus |
62 | sign (``-'') followed by a sequence of digits optionally containing | 60 | .Pq Ql + |
61 | or minus sign | ||
62 | .Pq Ql - | ||
63 | followed by a sequence of digits optionally containing | ||
63 | a decimal-point character, optionally followed by an exponent. | 64 | a decimal-point character, optionally followed by an exponent. |
64 | An exponent consists of an ``E'' or ``e'', followed by an optional plus | 65 | An exponent consists of an |
65 | or minus sign, followed by a sequence of digits. | 66 | .Sq E |
67 | or | ||
68 | .Sq e , | ||
69 | followed by an optional plus or minus sign, followed by a sequence of digits. | ||
66 | .Pp | 70 | .Pp |
67 | Leading white-space characters in the string (as defined by the | 71 | Leading whitespace characters in the string (as defined by the |
68 | .Xr isspace 3 | 72 | .Xr isspace 3 |
69 | function) are skipped. | 73 | function) are skipped. |
70 | .Sh RETURN VALUES | 74 | .Sh RETURN VALUES |
@@ -88,18 +92,18 @@ is stored in the location referenced by | |||
88 | If the correct value would cause overflow, plus or minus | 92 | If the correct value would cause overflow, plus or minus |
89 | .Dv HUGE_VAL | 93 | .Dv HUGE_VAL |
90 | is returned (according to the sign of the value), and | 94 | is returned (according to the sign of the value), and |
91 | .Dv ERANGE | 95 | .Er ERANGE |
92 | is stored in | 96 | is stored in |
93 | .Va errno . | 97 | .Va errno . |
94 | If the correct value would cause underflow, zero is | 98 | If the correct value would cause underflow, zero is returned and |
95 | returned and | 99 | .Er ERANGE |
96 | .Dv ERANGE | 100 | is stored in |
97 | is stored in | ||
98 | .Va errno . | 101 | .Va errno . |
99 | .Sh ERRORS | 102 | .Sh ERRORS |
100 | .Bl -tag -width Er | 103 | .Bl -tag -width Er |
101 | .It Bq Er ERANGE | 104 | .It Bq Er ERANGE |
102 | Overflow or underflow occurred. | 105 | Overflow or underflow occurred. |
106 | .El | ||
103 | .Sh SEE ALSO | 107 | .Sh SEE ALSO |
104 | .Xr atof 3 , | 108 | .Xr atof 3 , |
105 | .Xr atoi 3 , | 109 | .Xr atoi 3 , |
@@ -109,6 +113,5 @@ Overflow or underflow occurred. | |||
109 | .Sh STANDARDS | 113 | .Sh STANDARDS |
110 | The | 114 | The |
111 | .Fn strtod | 115 | .Fn strtod |
112 | function | 116 | function conforms to |
113 | conforms to | ||
114 | .St -ansiC . | 117 | .St -ansiC . |