9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)\mathsf{fma}\left({y}^{2}, 2 - {y}^{2}, 9 \cdot {x}^{4}\right) + \left(y \cdot \left(y \cdot y - 2\right)\right) \cdot \left(\left(-y\right) + y\right)double code(double x, double y) {
return ((9.0 * pow(x, 4.0)) - ((y * y) * ((y * y) - 2.0)));
}
double code(double x, double y) {
return (fma(pow(y, 2.0), (2.0 - pow(y, 2.0)), (9.0 * pow(x, 4.0))) + ((y * ((y * y) - 2.0)) * (-y + y)));
}
Results
Initial program 62.0
rmApplied prod-diff0
Simplified52.0
Simplified0
Final simplification0
herbie shell --seed 2020071 +o rules:numerics
(FPCore (x y)
:name "From Rump in a 1983 paper, rewritten"
:precision binary64
:pre (and (== x 10864) (== y 18817))
(- (* 9 (pow x 4)) (* (* y y) (- (* y y) 2))))