开发者

Are C++ floats guaranteed to have infinity?

In standards compliant C++, is the following guaranteed to b开发者_JAVA百科e true?

#include <limits>
std::numeric_limits<float>::has_infinity


I'm no expert, but doesn't that depend on the value of is_iec559, (Tests if a type conforms to IEC-559 / IEEE-754 standard)?


It should, assuming that your library implementation follows the C++ standards and uses a float that has an infinity.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜