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 r473049 = x;
double r473050 = 1.0;
double r473051 = y;
double r473052 = r473051 * r473051;
double r473053 = r473050 + r473052;
double r473054 = r473049 * r473053;
return r473054;
}
double f(double x, double y) {
double r473055 = x;
double r473056 = 1.0;
double r473057 = r473055 * r473056;
double r473058 = y;
double r473059 = r473055 * r473058;
double r473060 = r473059 * r473058;
double r473061 = r473057 + r473060;
return r473061;
}




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 unpow25.3
Applied associate-*r*0.1
Final simplification0.1
herbie shell --seed 2020045 +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))))