https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111747
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
32bit floating point has the following characteristics:
Sign bit: 1 bit
Exponent width: 8 bits
Significand precision: 24 bits (23 explicitly stored)
50000000 is 0x2faf080 which is more than 24bits in precision which means it
cannot be represented exactly and when you start to add 1 to something which is
greater than 0xfffff0 (which is what 1.67772e+07 is), the value stays the same
and you start to lose precision.