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 r358856 = x;
double r358857 = 1.0;
double r358858 = y;
double r358859 = r358858 * r358858;
double r358860 = r358857 + r358859;
double r358861 = r358856 * r358860;
return r358861;
}
double f(double x, double y) {
double r358862 = y;
double r358863 = 1.0;
double r358864 = fma(r358862, r358862, r358863);
double r358865 = sqrt(r358864);
double r358866 = x;
double r358867 = r358865 * r358866;
double r358868 = r358865 * r358867;
return r358868;
}




Bits error versus x




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