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 r458130 = x;
double r458131 = 1.0;
double r458132 = y;
double r458133 = r458132 * r458132;
double r458134 = r458131 + r458133;
double r458135 = r458130 * r458134;
return r458135;
}
double f(double x, double y) {
double r458136 = x;
double r458137 = 1.0;
double r458138 = r458136 * r458137;
double r458139 = y;
double r458140 = r458136 * r458139;
double r458141 = r458140 * r458139;
double r458142 = r458138 + r458141;
return r458142;
}




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