std::islessgreater
Defined in header <cmath> | | |
---|---|---|
bool islessgreater( float x, float y ); | (1) | (since C++11) |
bool islessgreater( double x, double y ); | (2) | (since C++11) |
bool islessgreater( long double x, long double y ); | (3) | (since C++11) |
bool islessgreater( Arithmetic x, Arithmetic y ); | (4) | (since C++11) |
1-3%29确定浮点数x
小于或大于浮点数。y
,而不设置浮点异常。
4%29一组重载或函数模板,用于%281-3%29中未涵盖的所有算术类型参数组合。如果有任何争论积分型,它被铸造成double
...
参数
x | - | floating point value |
---|---|---|
y | - | floating point value |
返回值
true
如果x < y || x > y
,,,false
否则。
注记
内建operator<
和operator>
对于浮点数可能会引发FE_INVALID
如果其中一个或两个论点都是NaN。此函数是表达式的“静默”版本。x < y || x > y
...
另见
isless (C++11) | checks if the first floating-point argument is less than the second (function) |
---|---|
isgreater (C++11) | checks if the first floating-point argument is greater than the second (function) |
C岛文件
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com