9 \cdot {x}^{4} - \left(y \cdot y\right) \cdot \left(y \cdot y - 2\right)\mathsf{fma}\left(\sqrt{\mathsf{fma}\left({x}^{4}, 9, 2 \cdot \left(y \cdot y\right)\right)}, \sqrt{\mathsf{fma}\left({x}^{4}, 9, 2 \cdot \left(y \cdot y\right)\right)}, -{y}^{4}\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(sqrt(fma(pow(x, 4.0), 9.0, (2.0 * (y * y)))), sqrt(fma(pow(x, 4.0), 9.0, (2.0 * (y * y)))), -pow(y, 4.0));
}
Results
Initial program 62.0
Simplified62.0
rmApplied add-sqr-sqrt62.0
Applied fma-neg0
Final simplification0
herbie shell --seed 2020091 +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))))