INFINITY - cppreference.com
Namespaces
Variants

INFINITY

From cppreference.com
 
 
 
Common mathematical functions
Functions
Basic operations
(C++11)    
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
Exponential functions
(C++11)
(C++11)

(C++11)
(C++11)
Power functions
(C++11)
(C++11)
Trigonometric and
hyperbolic functions
(C++11)
(C++11)
(C++11)

Error and gamma functions
(C++11)
(C++11)
(C++11)
(C++11)
Nearest integer floating point operations
(C++11)(C++11)(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
Floating point manipulation functions
(C++11)(C++11)
(C++11)
(C++11)
(C++11)(C++11)
(C++26)(C++26)
(C++11)
Classification and comparison
(C++11)    
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
Types
(C++11)
(C++11)
(C++11)
Macro constants
(C++11)
(C++11)
(C++26)(C++26)(C++26)

 
Defined in header <math.h>
(deprecated in C++26)
Defined in header <float.h>
(since C++26)
#define INFINITY /* implementation-defined */
(since C++11)

If the implementation supports an infinity for the type float, the macro INFINITY expands to constant expression of type float which evaluates to positive or unsigned infinity.

Otherwise, the macro INFINITY expands to a positive value that is guaranteed to overflow a float at compile time, and the use of this macro generates a compiler warning.

(until C++26)

Otherwise, the macro INFINITY is not defined.

(since C++26)

See also