x \cdot \left(1.0 + y \cdot y\right)
\mathsf{fma}\left(y, y, 1.0\right) \cdot xdouble f(double x, double y) {
double r21030999 = x;
double r21031000 = 1.0;
double r21031001 = y;
double r21031002 = r21031001 * r21031001;
double r21031003 = r21031000 + r21031002;
double r21031004 = r21030999 * r21031003;
return r21031004;
}
double f(double x, double y) {
double r21031005 = y;
double r21031006 = 1.0;
double r21031007 = fma(r21031005, r21031005, r21031006);
double r21031008 = x;
double r21031009 = r21031007 * r21031008;
return r21031009;
}




Bits error versus x




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