\left(\left(333.75 \cdot {y}^{6} + \left(x \cdot x\right) \cdot \left(\left(\left(\left(\left(\left(11 \cdot x\right) \cdot x\right) \cdot y\right) \cdot y - {y}^{6}\right) - 121 \cdot {y}^{4}\right) - 2\right)\right) + 5.5 \cdot {y}^{8}\right) + \frac{x}{2 \cdot y}0.5 \cdot \frac{x}{y} - 2 \cdot {x}^{2}double code(double x, double y) {
return ((((333.75 * pow(y, 6.0)) + ((x * x) * (((((((11.0 * x) * x) * y) * y) - pow(y, 6.0)) - (121.0 * pow(y, 4.0))) - 2.0))) + (5.5 * pow(y, 8.0))) + (x / (2.0 * y)));
}
double code(double x, double y) {
return ((0.5 * (x / y)) - (2.0 * pow(x, 2.0)));
}
Results
Initial program 58.1
Simplified58.1
Taylor expanded around 0 57.1
Final simplification57.1
herbie shell --seed 2020106 +o rules:numerics
(FPCore (x y)
:name "Rump's expression from Stadtherr's award speech"
:precision binary64
:pre (and (== x 77617) (== y 33096))
(+ (+ (+ (* 333.75 (pow y 6)) (* (* x x) (- (- (- (* (* (* (* 11 x) x) y) y) (pow y 6)) (* 121 (pow y 4))) 2))) (* 5.5 (pow y 8))) (/ x (* 2 y))))