.\" 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.
.\" 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
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
.Xr atof 3 ,
.Xr atoi 3 ,
.Xr atol 3 ,
+.Xr nan 3 ,
.Xr strtol 3 ,
.Xr strtoul 3 ,
.Xr wcstod 3
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 .