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 r460504 = x;
double r460505 = 1.0;
double r460506 = y;
double r460507 = r460506 * r460506;
double r460508 = r460505 + r460507;
double r460509 = r460504 * r460508;
return r460509;
}
double f(double x, double y) {
double r460510 = x;
double r460511 = 1.0;
double r460512 = r460510 * r460511;
double r460513 = y;
double r460514 = r460510 * r460513;
double r460515 = r460514 * r460513;
double r460516 = r460512 + r460515;
return r460516;
}




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.4
rmApplied associate-*r*0.1
Final simplification0.1
herbie shell --seed 2019353 +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))))