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 r510627 = x;
double r510628 = 1.0;
double r510629 = y;
double r510630 = r510629 * r510629;
double r510631 = r510628 + r510630;
double r510632 = r510627 * r510631;
return r510632;
}
double f(double x, double y) {
double r510633 = x;
double r510634 = 1.0;
double r510635 = r510633 * r510634;
double r510636 = y;
double r510637 = r510633 * r510636;
double r510638 = r510637 * r510636;
double r510639 = r510635 + r510638;
return r510639;
}




Bits error versus x




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