http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57034
--- Comment #6 from Christopher Hite <christopher.hite at jpmorgan dot com> 2013-04-23 17:26:26 UTC --- Good, I was a big worried I couldn't convert ints to floats unless the int was safely mappable. It rounds which is what I'd expect. I now think z5 is safe, since int32_t(float(MAX)) wouldn't be evaluated. const float fMAX=std::numeric_limits<int32_t>::max(); Any (positive) float less than fMax, must be representable in int32_t, though z5 will never equal MAX-1 or MAX-2.... Do you agree? z5 is definately clearer code than playing with fetestexcept(). I'd guess it's also faster.