X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/fbd86d4cc20b02a10edcca92fb7ae0a143e63cc4..1f2f436a38f7ae2d39a943ad2898d8fed4ed2e58:/stdlib/FreeBSD/strtod.3 diff --git a/stdlib/FreeBSD/strtod.3 b/stdlib/FreeBSD/strtod.3 index f40d896..42352b3 100644 --- a/stdlib/FreeBSD/strtod.3 +++ b/stdlib/FreeBSD/strtod.3 @@ -13,10 +13,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. @@ -34,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)strtod.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/stdlib/strtod.3,v 1.19 2003/05/22 13:02:28 ru Exp $ +.\" $FreeBSD: src/lib/libc/stdlib/strtod.3,v 1.22 2007/12/16 21:19:28 das Exp $ .\" .Dd March 2, 2003 .Dt STRTOD 3 @@ -90,8 +86,28 @@ For hexadecimal constants, the scaling is instead done by powers of 2. .Pp Alternatively, if the portion of the string following the optional -plus or minus sign begins with ``INFINITY'' or ``NAN'', ignoring -case, it is interpreted as an infinity or a quiet NaN, respectively. +plus or minus sign begins with +.Dq INFINITY +or +.Dq NAN , +ignoring case, it is interpreted as an infinity or a quiet \*(Na, +respectively. +The syntax +.Dq Xo Pf NAN( Ar "s" ) Xc , +where +.Ar s +is an alphanumeric string, produces the same value as the call +.Fo nan +.Qq Ar s Ns +.Fc +(respectively, +.Fo nanf +.Qq Ar s Ns +.Fc +and +.Fo nanl +.Qq Ar s Ns +.Fc . ) .Pp In any of the above cases, leading white-space characters in the string (as defined by the @@ -144,6 +160,7 @@ Overflow or underflow occurred. .Xr atof 3 , .Xr atoi 3 , .Xr atol 3 , +.Xr nan 3 , .Xr strtol 3 , .Xr strtoul 3 , .Xr wcstod 3 @@ -154,8 +171,6 @@ function conforms to .St -isoC-99 , with the exception of the bug noted below. -.Sh BUGS -These routines do not recognize the C99 ``NaN(...)'' syntax. .Sh AUTHORS The author of this software is .An David M. Gay .