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 r20009189 = x;
double r20009190 = 1.0;
double r20009191 = y;
double r20009192 = r20009191 * r20009191;
double r20009193 = r20009190 + r20009192;
double r20009194 = r20009189 * r20009193;
return r20009194;
}
double f(double x, double y) {
double r20009195 = y;
double r20009196 = 1.0;
double r20009197 = fma(r20009195, r20009195, r20009196);
double r20009198 = sqrt(r20009197);
double r20009199 = x;
double r20009200 = r20009198 * r20009199;
double r20009201 = r20009198 * r20009200;
return r20009201;
}




Bits error versus x




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