1NAN(P)                     POSIX Programmer's Manual                    NAN(P)
2
3
4

NAME

6       nan, nanf, nanl - return quiet NaN
7

SYNOPSIS

9       #include <math.h>
10
11       double nan(const char *tagp);
12       float nanf(const char *tagp);
13       long double nanl(const char *tagp);
14
15

DESCRIPTION

17       The function call nan("n-char-sequence") shall be equivalent to:
18
19
20              strtod("NAN(n-char-sequence)", (char **) NULL);
21
22       The function call nan("") shall be equivalent to:
23
24
25              strtod("NAN()", (char **) NULL)
26
27       If  tagp  does not point to an n- char sequence or an empty string, the
28       function call shall be equivalent to:
29
30
31              strtod("NAN", (char **) NULL)
32
33       Function calls to nanf() and nanl() are equivalent to the corresponding
34       function calls to strtof() and strtold().
35

RETURN VALUE

37       These  functions  shall  return a quiet NaN, if available, with content
38       indicated through tagp.
39
40       If the implementation does not  support  quiet  NaNs,  these  functions
41       shall return zero.
42

ERRORS

44       No errors are defined.
45
46       The following sections are informative.
47

EXAMPLES

49       None.
50

APPLICATION USAGE

52       None.
53

RATIONALE

55       None.
56

FUTURE DIRECTIONS

58       None.
59

SEE ALSO

61       strtod()    ,    strtold()   ,   the   Base   Definitions   volume   of
62       IEEE Std 1003.1-2001, <math.h>
63
65       Portions of this text are reprinted and reproduced in  electronic  form
66       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
67       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
68       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
69       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
70       event of any discrepancy between this version and the original IEEE and
71       The Open Group Standard, the original IEEE and The Open Group  Standard
72       is  the  referee document. The original Standard can be obtained online
73       at http://www.opengroup.org/unix/online.html .
74
75
76
77IEEE/The Open Group                  2003                               NAN(P)
Impressum