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 r441335 = x;
double r441336 = 1.0;
double r441337 = y;
double r441338 = r441337 * r441337;
double r441339 = r441336 + r441338;
double r441340 = r441335 * r441339;
return r441340;
}
double f(double x, double y) {
double r441341 = x;
double r441342 = 1.0;
double r441343 = r441341 * r441342;
double r441344 = y;
double r441345 = r441341 * r441344;
double r441346 = r441345 * r441344;
double r441347 = r441343 + r441346;
return r441347;
}




Bits error versus x




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