https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107458
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Your definition of fma_manually is broken really. The following is closer to being correct though there is still an extra rounding step so it is still not 100%. inline constexpr float fma_manually(const float a, const float b, const float c) noexcept { double res = a; res *= b; res += c; return res; } inline constexpr double fma_manually(const double a, const double b, const double c) noexcept { long double res = a; res *= b; res += c; return res; } But GCC does the correct thing for fma and fmaf with x86-64-v3 and use the fma instruction. So closing as invalid.