diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/stdlib/strtod.3 | 25 |
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 |
| 51 | The | 51 | The |
| 52 | .Fn strtod | 52 | .Fn strtod |
| 53 | function converts the initial portion of the string | 53 | function converts the initial portion of the string pointed to by |
| 54 | pointed to by | ||
| 55 | .Fa nptr | 54 | .Fa nptr |
| 56 | to | 55 | to |
| 57 | .Li double | 56 | .Li double |
| 58 | representation. | 57 | representation. |
| 59 | .Pp | 58 | .Pp |
| 60 | The expected form of the string is an optional plus (``+'') or minus | 59 | The expected form of the string is an optional plus |
| 61 | 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 | ||
| 62 | a decimal-point character, optionally followed by an exponent. | 64 | a decimal-point character, optionally followed by an exponent. |
| 63 | An exponent consists of an ``E'' or ``e'', followed by an optional plus | 65 | An exponent consists of an |
| 64 | 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. | ||
| 65 | .Pp | 70 | .Pp |
| 66 | Leading whitespace characters in the string (as defined by the | 71 | Leading 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 |
| 91 | is stored in | 96 | is stored in |
| 92 | .Va errno . | 97 | .Va errno . |
| 93 | If the correct value would cause underflow, zero is | 98 | If the correct value would cause underflow, zero is returned and |
| 94 | returned and | ||
| 95 | .Er ERANGE | 99 | .Er ERANGE |
| 96 | is stored in | 100 | is stored in |
| 97 | .Va errno . | 101 | .Va errno . |
| @@ -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 . |
