C Standard Library

C <math.h> - INFINITY



The INFINITY macros expands to an expression of type float.

If the implementation supports floating-point infinities, this is defined as the value that represents a positive or unsigned infinity. If the implementation does not support floating-point infinities, 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. This may be returned by a function that signals a range error by setting errno to ERANGE.


Definition in the <math.h> header file is:

#define INFINITY /* implementation defined */

❮ C <math.h> Library