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 r417413 = x;
double r417414 = 1.0;
double r417415 = y;
double r417416 = r417415 * r417415;
double r417417 = r417414 + r417416;
double r417418 = r417413 * r417417;
return r417418;
}
double f(double x, double y) {
double r417419 = x;
double r417420 = 1.0;
double r417421 = r417419 * r417420;
double r417422 = y;
double r417423 = r417419 * r417422;
double r417424 = r417423 * r417422;
double r417425 = r417421 + r417424;
return r417425;
}




Bits error versus x




Bits error versus y
Results
| Original | 5.5 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 5.5
rmApplied distribute-lft-in5.5
rmApplied associate-*r*0.1
Final simplification0.1
herbie shell --seed 2020039 +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))))