1INFINITY(3)                Linux Programmer's Manual               INFINITY(3)
2
3
4

NAME

6       INFINITY,  NAN,  HUGE_VAL,  HUGE_VALF,  HUGE_VALL - floating-point con‐
7       stants
8

SYNOPSIS

10       #define _ISOC99_SOURCE      /* See feature_test_macros(7) */
11       #include <math.h>
12
13       INFINITY
14
15       NAN
16
17       HUGE_VAL
18       HUGE_VALF
19       HUGE_VALL
20

DESCRIPTION

22       The macro INFINITY expands to a float  constant  representing  positive
23       infinity.
24
25       The  macro  NAN  expands  to  a float constant representing a quiet NaN
26       (when supported).  A quiet NaN is a NaN ("not-a-number") that does  not
27       raise exceptions when it is used in arithmetic.  The opposite is a sig‐
28       naling NaN.  See IEC 60559:1989.
29
30       The macros HUGE_VAL, HUGE_VALF, HUGE_VALL expand to constants of  types
31       double,  float  and  long  double, respectively, that represent a large
32       positive value, possibly positive infinity.
33

CONFORMING TO

35       C99.
36

AVAILABILITY

38       On a glibc system, the macro HUGE_VAL is always available.   Availabil‐
39       ity  of the NAN macro can be tested using #ifdef NAN, and similarly for
40       INFINITY, HUGE_VALF, HUGE_VALL.  They will be defined  by  <math.h>  if
41       _ISOC99_SOURCE  or  _GNU_SOURCE  is  defined,  or  __STDC_VERSION__  is
42       defined and has a value not less than 199901L.
43

SEE ALSO

45       fpclassify(3), math_error(7)
46

COLOPHON

48       This page is part of release 4.16 of the Linux  man-pages  project.   A
49       description  of  the project, information about reporting bugs, and the
50       latest    version    of    this    page,    can     be     found     at
51       https://www.kernel.org/doc/man-pages/.
52
53
54
55                                  2017-09-15                       INFINITY(3)
Impressum