1INFINITY(3)                Library Functions Manual                INFINITY(3)
2
3
4

NAME

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

LIBRARY

10       Math library (libm)
11

SYNOPSIS

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

DESCRIPTION

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

STANDARDS

38       C11.
39

HISTORY

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

SEE ALSO

50       fpclassify(3), math_error(7)
51
52
53
54Linux man-pages 6.05              2023-03-30                       INFINITY(3)
Impressum