nan.3m (2010 09)

n
nan(3M) nan(3M)
NAME
nan(), nanf(), nanl(), nanw(), nanq() - string to NaN conversion functions
SYNOPSIS
#include <math.h>
double nan(const char *tagp);
HP Integrity Server Only
float nanf(const char *tagp);
long double nanl(const char *tagp);
extended nanw(const char *tagp);
quad nanq(const char *tagp);
DESCRIPTION
The nan() function creates a quiet NaN from the specified string. If tagp does not point to an n-char-
sequence or an empty string, the call is equivalent to
strtod(""NAN"", (char**) NULL)
.
The ISO/IEC C99 standard specifies n-char-sequence syntax, but the interpretation and extension of the
syntax is implementation defined. The n-char-sequence argument is ignored on HP-UX systems.
Integrity Server Only
nanf() is a float version of nan(); it returns a float result.
nanl() is a long double version of nan(); it returns a long double result.
nanw() is an extended version of nan(); it returns an extended result.
nanq() is equivalent to nanl() on HP-UX systems.
USAGE
To use these functions, compile either with the default
-Ae option or with the
-Aa and
-D_HPUX_SOURCE options. To use
nanw()or nanq(), compile with the -fpwidetypes option.
Make sure your program includes
<math.h>, and link in the math library by specifying -lm
on the com-
piler or linker command line.
For more information, see the HP-UX floating-point guide for HP Integrity servers at:
http://www.hp.com/go/fp
.
RETURN VALUE
The
nan() function returns a quiet NaN.
These functions raise no exceptions.
ERRORS
No errors are defined.
SEE ALSO
copysign(3M), isnan(3M), nextafter(3M), math(5).
STANDARDS CONFORMANCE
nan(), nanf(), nanl() : ISO/IEC C99 (including Annex F, "IEC 60559 floating-point arithmetic")
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)