x \cdot \left(1 + y \cdot y\right)
1 \cdot x + \left(x \cdot y\right) \cdot y
double f(double x, double y) {
double r1081547 = x;
double r1081548 = 1.0;
double r1081549 = y;
double r1081550 = r1081549 * r1081549;
double r1081551 = r1081548 + r1081550;
double r1081552 = r1081547 * r1081551;
return r1081552;
}
double f(double x, double y) {
double r1081553 = 1.0;
double r1081554 = x;
double r1081555 = r1081553 * r1081554;
double r1081556 = y;
double r1081557 = r1081554 * r1081556;
double r1081558 = r1081557 * r1081556;
double r1081559 = r1081555 + r1081558;
return r1081559;
}




Bits error versus x




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