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 r390014 = x;
double r390015 = 1.0;
double r390016 = y;
double r390017 = r390016 * r390016;
double r390018 = r390015 + r390017;
double r390019 = r390014 * r390018;
return r390019;
}
double f(double x, double y) {
double r390020 = 1.0;
double r390021 = x;
double r390022 = r390020 * r390021;
double r390023 = y;
double r390024 = r390021 * r390023;
double r390025 = r390024 * r390023;
double r390026 = r390022 + r390025;
return r390026;
}




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 2020045
(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))))