GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NAN (3)

NAME

nan, nanf, nanl - quiet NaNs

CONTENTS

Library
Synopsis
Description
Compatibility
See Also
Standards

LIBRARY


.Lb libm

SYNOPSIS


.In math.h double nan const char *s float nanf const char *s long double nanl const char *s

DESCRIPTION

The NAN macro expands to a quiet NaN (Not A Number). Similarly, each of the nan, nanf, and nanl functions generate a quiet NaN value without raising an invalid exception. The argument s should point to either an empty string or a hexadecimal representation of a non-negative integer (e.g., "0x1234".) In the latter case, the integer is encoded in some free bits in the representation of the NaN, which sometimes store machine-specific information about why a particular NaN was generated. There are 22 such bits available for
.Vt float variables, 51 bits for
.Vt double variables, and at least 51 bits for a
.Vt long double . If s is improperly formatted or represents an integer that is too large, then the particular encoding of the quiet NaN that is returned is indeterminate.

COMPATIBILITY

Calling these functions with a non-empty string isn’t portable. Another operating system may translate the string into a different NaN encoding, and furthermore, the meaning of a given NaN encoding varies across machine architectures. If you understood the innards of a particular platform well enough to know what string to use, then you would have no need for these functions anyway, so don’t use them. Use the NAN macro instead.

SEE ALSO

fenv(3), ieee(3), isnan(3), math(3), strtod(3)

STANDARDS

The nan, nanf, and nanl functions and the NAN macro conform to -isoC-99.
Search for    or go to Top of page |  Section 3 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.