Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > N

nan(3M)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

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 compiler 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.

STANDARDS CONFORMANCE

nan(), nanf(), nanl() : ISO/IEC C99 (including Annex F, "IEC 60559 floating-point arithmetic")

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.