x \cdot \left(1 + y \cdot y\right)
\sqrt{\mathsf{fma}\left(y, y, 1\right)} \cdot \left(\sqrt{\mathsf{fma}\left(y, y, 1\right)} \cdot x\right)double f(double x, double y) {
double r51092199 = x;
double r51092200 = 1.0;
double r51092201 = y;
double r51092202 = r51092201 * r51092201;
double r51092203 = r51092200 + r51092202;
double r51092204 = r51092199 * r51092203;
return r51092204;
}
double f(double x, double y) {
double r51092205 = y;
double r51092206 = 1.0;
double r51092207 = fma(r51092205, r51092205, r51092206);
double r51092208 = sqrt(r51092207);
double r51092209 = x;
double r51092210 = r51092208 * r51092209;
double r51092211 = r51092208 * r51092210;
return r51092211;
}




Bits error versus x




Bits error versus y
| Original | 5.5 |
|---|---|
| Target | 0.1 |
| Herbie | 5.5 |
Initial program 5.5
Simplified5.5
rmApplied add-sqr-sqrt5.5
Applied associate-*l*5.5
Final simplification5.5
herbie shell --seed 2019173 +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))))