x \cdot \left(1 + y \cdot y\right)
x \cdot 1 + \left(x \cdot y\right) \cdot y
double f(double x, double y) {
double r484382 = x;
double r484383 = 1.0;
double r484384 = y;
double r484385 = r484384 * r484384;
double r484386 = r484383 + r484385;
double r484387 = r484382 * r484386;
return r484387;
}
double f(double x, double y) {
double r484388 = x;
double r484389 = 1.0;
double r484390 = r484388 * r484389;
double r484391 = y;
double r484392 = r484388 * r484391;
double r484393 = r484392 * r484391;
double r484394 = r484390 + r484393;
return r484394;
}




Bits error versus x




Bits error versus y
Results
| Original | 5.6 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 5.6
rmApplied distribute-lft-in5.6
rmApplied associate-*r*0.1
Final simplification0.1
herbie shell --seed 2020033 +o rules:numerics
(FPCore (x y)
:name "Numeric.Integration.TanhSinh:everywhere from integration-0.2.1"
:precision binary64
:herbie-target
(+ x (* (* x y) y))
(* x (+ 1 (* y y))))