Are C ++ floats guaranteed to have infinity?

In the C ++ compatible standard, is the following guaranteed:

#include <limits>
std::numeric_limits<float>::has_infinity
+3
source share
2 answers

I am not an expert, but it does not depend on the value is_iec559(tests, if the type complies with IEC-559 / IEEE-754)?

+3
source

It should, assuming your library implementation follows C ++ standards and uses float with infinity.

+1
source

All Articles