\frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}\sqrt[3]{{\left(\frac{x - y}{\mathsf{hypot}\left(x, y\right) \cdot \frac{\mathsf{hypot}\left(x, y\right)}{x + y}}\right)}^{3}}double f(double x, double y) {
double r96063 = x;
double r96064 = y;
double r96065 = r96063 - r96064;
double r96066 = r96063 + r96064;
double r96067 = r96065 * r96066;
double r96068 = r96063 * r96063;
double r96069 = r96064 * r96064;
double r96070 = r96068 + r96069;
double r96071 = r96067 / r96070;
return r96071;
}
double f(double x, double y) {
double r96072 = x;
double r96073 = y;
double r96074 = r96072 - r96073;
double r96075 = hypot(r96072, r96073);
double r96076 = r96072 + r96073;
double r96077 = r96075 / r96076;
double r96078 = r96075 * r96077;
double r96079 = r96074 / r96078;
double r96080 = 3.0;
double r96081 = pow(r96079, r96080);
double r96082 = cbrt(r96081);
return r96082;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.6 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 19.6
rmApplied add-cbrt-cube46.2
Applied add-cbrt-cube46.3
Applied add-cbrt-cube46.4
Applied cbrt-unprod46.1
Applied cbrt-undiv46.0
Simplified19.7
rmApplied *-un-lft-identity19.7
Applied add-sqr-sqrt19.7
Applied times-frac19.7
Simplified19.7
Simplified0.0
Final simplification0.0
herbie shell --seed 2019209 +o rules:numerics
(FPCore (x y)
:name "Kahan p9 Example"
:precision binary64
:pre (and (< 0.0 x 1) (< y 1))
:herbie-target
(if (< 0.5 (fabs (/ x y)) 2) (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) (- 1 (/ 2 (+ 1 (* (/ x y) (/ x y))))))
(/ (* (- x y) (+ x y)) (+ (* x x) (* y y))))