x \cdot \left(1 + y \cdot y\right)
\mathsf{fma}\left(y, y, 1\right) \cdot xdouble f(double x, double y) {
double r330419 = x;
double r330420 = 1.0;
double r330421 = y;
double r330422 = r330421 * r330421;
double r330423 = r330420 + r330422;
double r330424 = r330419 * r330423;
return r330424;
}
double f(double x, double y) {
double r330425 = y;
double r330426 = 1.0;
double r330427 = fma(r330425, r330425, r330426);
double r330428 = x;
double r330429 = r330427 * r330428;
return r330429;
}




Bits error versus x




Bits error versus y
| Original | 5.7 |
|---|---|
| Target | 0.1 |
| Herbie | 5.7 |
Initial program 5.7
Simplified5.7
Final simplification5.7
herbie shell --seed 2019322 +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))))