在线文档教程
C++
数字 | Numerics

INFINITY

无穷大

Defined in header
#define INFINITY /*implementation defined*/(since C++11)

如果实现支持浮点无穷大,则宏INFINITY扩展为类型的常量表达式。float它的计算值为正或无符号无穷大。

如果实现不支持浮点无穷大,则宏INFINITY展开为一个确保使float在编译时,使用此宏将生成编译器警告。

另见

isinf (C++11)checks if the given number is infinite (function)
HUGE_VALFHUGE_VALHUGE_VALL (C++11)(C++11)indicates the overflow value for float, double and long double respectively (macro constant)
has_infinity staticidentifies floating-point types that can represent the special value "positive infinity" (public static member constant of std::numeric_limits)
infinity staticreturns the positive infinity value of the given floating-point type (public static member function of std::numeric_limits)

C无限文档

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/数值/数学/无穷大