\[\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z
\]
↓
\[\mathsf{fma}\left(y, x, \mathsf{fma}\left(z \cdot 4, z, -z \cdot z\right)\right)
\]
(FPCore (x y z)
:precision binary64
(+ (+ (+ (* x y) (* z z)) (* z z)) (* z z)))
↓
(FPCore (x y z) :precision binary64 (fma y x (fma (* z 4.0) z (- (* z z)))))
double code(double x, double y, double z) {
return (((x * y) + (z * z)) + (z * z)) + (z * z);
}
↓
double code(double x, double y, double z) {
return fma(y, x, fma((z * 4.0), z, -(z * z)));
}
function code(x, y, z)
return Float64(Float64(Float64(Float64(x * y) + Float64(z * z)) + Float64(z * z)) + Float64(z * z))
end
↓
function code(x, y, z)
return fma(y, x, fma(Float64(z * 4.0), z, Float64(-Float64(z * z))))
end
code[x_, y_, z_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(z * z), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(y * x + N[(N[(z * 4.0), $MachinePrecision] * z + (-N[(z * z), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]
\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z
↓
\mathsf{fma}\left(y, x, \mathsf{fma}\left(z \cdot 4, z, -z \cdot z\right)\right)