C++ is the inverse of std::numeric_limits::infinity() zero?

  • A+

Short question: is there anything in the C++ standard (or the IEEE754 floating point that guarantees that 1./std::numeric_limits<double>::infinity() is zero (or at least a small number)?


Any finite number divided by infinity results in zero under IEEE 754 (and therefore the same in most typical C++ implementations).


:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: