x \cdot \left(1 + y \cdot y\right)
\left(x \cdot \mathsf{hypot}\left(\sqrt{1}, y\right)\right) \cdot \mathsf{hypot}\left(\sqrt{1}, y\right)double f(double x, double y) {
double r489540 = x;
double r489541 = 1.0;
double r489542 = y;
double r489543 = r489542 * r489542;
double r489544 = r489541 + r489543;
double r489545 = r489540 * r489544;
return r489545;
}
double f(double x, double y) {
double r489546 = x;
double r489547 = 1.0;
double r489548 = sqrt(r489547);
double r489549 = y;
double r489550 = hypot(r489548, r489549);
double r489551 = r489546 * r489550;
double r489552 = r489551 * r489550;
return r489552;
}




Bits error versus x




Bits error versus y
Results
| Original | 5.5 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 5.5
rmApplied *-commutative5.5
rmApplied add-sqr-sqrt5.5
Applied associate-*l*5.5
rmApplied add-sqr-sqrt5.5
Applied sqrt-prod5.6
Applied associate-*l*5.6
Simplified5.6
rmApplied associate-*r*5.6
Simplified0.1
Final simplification0.1
herbie shell --seed 2020002 +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))))