diff options
Diffstat (limited to 'src/lib/libc')
| -rw-r--r-- | src/lib/libc/stdlib/strtod.3 | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/strtod.3 b/src/lib/libc/stdlib/strtod.3 index f1fc781f7d..13db821c68 100644 --- a/src/lib/libc/stdlib/strtod.3 +++ b/src/lib/libc/stdlib/strtod.3 | |||
| @@ -29,9 +29,9 @@ | |||
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
| 31 | .\" | 31 | .\" |
| 32 | .\" $OpenBSD: strtod.3,v 1.14 2008/09/13 22:48:45 martynas Exp $ | 32 | .\" $OpenBSD: strtod.3,v 1.15 2012/09/15 11:47:04 martynas Exp $ |
| 33 | .\" | 33 | .\" |
| 34 | .Dd $Mdocdate: September 13 2008 $ | 34 | .Dd $Mdocdate: September 15 2012 $ |
| 35 | .Dt STRTOD 3 | 35 | .Dt STRTOD 3 |
| 36 | .Os | 36 | .Os |
| 37 | .Sh NAME | 37 | .Sh NAME |
| @@ -87,7 +87,32 @@ or | |||
| 87 | .Sq e , | 87 | .Sq e , |
| 88 | followed by an optional plus or minus sign, followed by a sequence of digits. | 88 | followed by an optional plus or minus sign, followed by a sequence of digits. |
| 89 | .Pp | 89 | .Pp |
| 90 | Leading whitespace characters in the string (as defined by the | 90 | Alternatively, if the portion of the string following the optional |
| 91 | plus or minus sign begins with | ||
| 92 | .Dq INF | ||
| 93 | or | ||
| 94 | .Dq NAN , | ||
| 95 | ignoring case, it is interpreted as an infinity or a quiet \*(Na, | ||
| 96 | respectively. | ||
| 97 | The syntax | ||
| 98 | .Dq Xo Pf NAN( Ar "s" ) Xc , | ||
| 99 | where | ||
| 100 | .Ar s | ||
| 101 | is an alphanumeric string, produces the same value as the call | ||
| 102 | .Fo nan | ||
| 103 | .Qq Ar s Ns | ||
| 104 | .Fc | ||
| 105 | (respectively, | ||
| 106 | .Fo nanf | ||
| 107 | .Qq Ar s Ns | ||
| 108 | .Fc | ||
| 109 | and | ||
| 110 | .Fo nanl | ||
| 111 | .Qq Ar s Ns | ||
| 112 | .Fc . ) | ||
| 113 | .Pp | ||
| 114 | In any of the above cases, leading whitespace characters in the | ||
| 115 | string (as defined by the | ||
| 91 | .Xr isspace 3 | 116 | .Xr isspace 3 |
| 92 | function) are skipped. | 117 | function) are skipped. |
| 93 | .Sh RETURN VALUES | 118 | .Sh RETURN VALUES |
