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 r245991 = x;
double r245992 = 1.0;
double r245993 = y;
double r245994 = r245993 * r245993;
double r245995 = r245992 + r245994;
double r245996 = r245991 * r245995;
return r245996;
}
double f(double x, double y) {
double r245997 = y;
double r245998 = 1.0;
double r245999 = fma(r245997, r245997, r245998);
double r246000 = sqrt(r245999);
double r246001 = x;
double r246002 = r246000 * r246001;
double r246003 = r246000 * r246002;
return r246003;
}




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 2019212 +o rules:numerics
(FPCore (x y)
:name "Numeric.Integration.TanhSinh:everywhere from integration-0.2.1"
:precision binary64
:herbie-target
(+ x (* (* x y) y))
(* x (+ 1 (* y y))))