x \cdot \left(1 + y \cdot y\right)
\mathsf{fma}\left(x \cdot y, y, 1 \cdot x\right)double f(double x, double y) {
double r17276641 = x;
double r17276642 = 1.0;
double r17276643 = y;
double r17276644 = r17276643 * r17276643;
double r17276645 = r17276642 + r17276644;
double r17276646 = r17276641 * r17276645;
return r17276646;
}
double f(double x, double y) {
double r17276647 = x;
double r17276648 = y;
double r17276649 = r17276647 * r17276648;
double r17276650 = 1.0;
double r17276651 = r17276650 * r17276647;
double r17276652 = fma(r17276649, r17276648, r17276651);
return r17276652;
}




Bits error versus x




Bits error versus y
| Original | 5.4 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 5.4
Simplified5.4
rmApplied add-sqr-sqrt34.6
Applied add-sqr-sqrt34.6
Applied unswap-sqr34.6
Taylor expanded around 0 5.4
Simplified0.1
Final simplification0.1
herbie shell --seed 2019171 +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))))