x \cdot \left(1 + y \cdot y\right)
\mathsf{hypot}\left(\sqrt{1}, y\right) \cdot \left(\mathsf{hypot}\left(\sqrt{1}, y\right) \cdot x\right)double f(double x, double y) {
double r560064 = x;
double r560065 = 1.0;
double r560066 = y;
double r560067 = r560066 * r560066;
double r560068 = r560065 + r560067;
double r560069 = r560064 * r560068;
return r560069;
}
double f(double x, double y) {
double r560070 = 1.0;
double r560071 = sqrt(r560070);
double r560072 = y;
double r560073 = hypot(r560071, r560072);
double r560074 = x;
double r560075 = r560073 * r560074;
double r560076 = r560073 * r560075;
return r560076;
}




Bits error versus x




Bits error versus y
Results
| Original | 5.3 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 5.3
rmApplied add-sqr-sqrt5.3
Applied associate-*r*5.3
rmApplied *-un-lft-identity5.3
Applied sqrt-prod5.3
Simplified5.3
Simplified5.3
rmApplied add-sqr-sqrt5.3
Applied hypot-def0.1
Final simplification0.1
herbie shell --seed 2020035 +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))))