https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82318
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Target| |i?86-*-* --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This is interesting because log2 should have already done a rounding to double before returning. What glibc version are you using because that matters here too.