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

SEE ALSO

44       fpclassify(3), math_error(7)
45

COLOPHON

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