NAN(3M)NAN(3M)


NAME
     nan, nanf, nanl - functions that return a quiet NaN

SYNOPSIS
     #include <math.h>

     double nan(const char *tagp);
     float nanf(const char *tagp);
     long double nanl(const char *tagp);

DESCRIPTION
     These routines are not available for programs compiled with the O32
     ABI.

     Functions in the standard math library (libm.a) are referred to as -lm
     versions. Those in mathx library (libmx.a) are referred to as -lmx
     versions, and those in the the BSD math library (libm43.a) are
     referred to as -lm43 versions.

     The nan functions return a quiet NaN, if available, with content
     indicated through tagp. If the implementation does not support quiet
     NaNs, the functions return zero.

RETURN VALUES
     The -lm and -lmx versions always return the default Quiet NaN and set
     errno to EDOM when a NaN is used as an argument.  A NaN argument
     usually causes the -lm43 versions to return the same argument.  The
     -lm43 versions never set errno.

     See matherr(3M) for a description of error handling for -lmx
     functions.

SEE ALSO
     math(3M), isnan(3M), matherr(3M)