x \cdot \left(1 + y \cdot y\right)
\mathsf{fma}\left(y, y, 1\right) \cdot xdouble f(double x, double y) {
double r16634416 = x;
double r16634417 = 1.0;
double r16634418 = y;
double r16634419 = r16634418 * r16634418;
double r16634420 = r16634417 + r16634419;
double r16634421 = r16634416 * r16634420;
return r16634421;
}
double f(double x, double y) {
double r16634422 = y;
double r16634423 = 1.0;
double r16634424 = fma(r16634422, r16634422, r16634423);
double r16634425 = x;
double r16634426 = r16634424 * r16634425;
return r16634426;
}




Bits error versus x




Bits error versus y
| Original | 5.3 |
|---|---|
| Target | 0.1 |
| Herbie | 5.3 |
Initial program 5.3
Simplified5.3
Final simplification5.3
herbie shell --seed 2019174 +o rules:numerics
(FPCore (x y)
:name "Numeric.Integration.TanhSinh:everywhere from integration-0.2.1"
:herbie-target
(+ x (* (* x y) y))
(* x (+ 1.0 (* y y))))