\frac{\left(x - y\right) \cdot \left(x + y\right)}{x \cdot x + y \cdot y}\begin{array}{l}
\mathbf{if}\;y \le -1.3384733654556106 \cdot 10^{+154}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \le -1.5675314538252927 \cdot 10^{-162}:\\
\;\;\;\;\left(\sqrt[3]{\frac{\left(x - y\right) \cdot \left(y + x\right)}{y \cdot y + x \cdot x}} \cdot \sqrt[3]{\frac{\left(x - y\right) \cdot \left(y + x\right)}{y \cdot y + x \cdot x}}\right) \cdot \sqrt[3]{\frac{\left(x - y\right) \cdot \left(y + x\right)}{y \cdot y + x \cdot x}}\\
\mathbf{elif}\;y \le 1.3055224462810883 \cdot 10^{-161}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y \cdot y + x \cdot x}{\left(x - y\right) \cdot \left(y + x\right)}}\\
\end{array}double f(double x, double y) {
double r20555569 = x;
double r20555570 = y;
double r20555571 = r20555569 - r20555570;
double r20555572 = r20555569 + r20555570;
double r20555573 = r20555571 * r20555572;
double r20555574 = r20555569 * r20555569;
double r20555575 = r20555570 * r20555570;
double r20555576 = r20555574 + r20555575;
double r20555577 = r20555573 / r20555576;
return r20555577;
}
double f(double x, double y) {
double r20555578 = y;
double r20555579 = -1.3384733654556106e+154;
bool r20555580 = r20555578 <= r20555579;
double r20555581 = -1.0;
double r20555582 = -1.5675314538252927e-162;
bool r20555583 = r20555578 <= r20555582;
double r20555584 = x;
double r20555585 = r20555584 - r20555578;
double r20555586 = r20555578 + r20555584;
double r20555587 = r20555585 * r20555586;
double r20555588 = r20555578 * r20555578;
double r20555589 = r20555584 * r20555584;
double r20555590 = r20555588 + r20555589;
double r20555591 = r20555587 / r20555590;
double r20555592 = cbrt(r20555591);
double r20555593 = r20555592 * r20555592;
double r20555594 = r20555593 * r20555592;
double r20555595 = 1.3055224462810883e-161;
bool r20555596 = r20555578 <= r20555595;
double r20555597 = 1.0;
double r20555598 = r20555590 / r20555587;
double r20555599 = r20555597 / r20555598;
double r20555600 = r20555596 ? r20555597 : r20555599;
double r20555601 = r20555583 ? r20555594 : r20555600;
double r20555602 = r20555580 ? r20555581 : r20555601;
return r20555602;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.5 |
|---|---|
| Target | 0.1 |
| Herbie | 5.5 |
if y < -1.3384733654556106e+154Initial program 63.6
Taylor expanded around 0 0
if -1.3384733654556106e+154 < y < -1.5675314538252927e-162Initial program 0.0
rmApplied add-cube-cbrt0.0
if -1.5675314538252927e-162 < y < 1.3055224462810883e-161Initial program 30.4
Taylor expanded around -inf 16.5
if 1.3055224462810883e-161 < y Initial program 0.0
rmApplied clear-num0.0
Final simplification5.5
herbie shell --seed 2019125
(FPCore (x y)
:name "Kahan p9 Example"
:pre (and (< 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))))