\frac{\left(x \cdot 2\right) \cdot y}{x - y}\begin{array}{l}
\mathbf{if}\;y \le -6.819752026637393519506049512320603510099 \cdot 10^{-42} \lor \neg \left(y \le 3.147408210159048214381836933498385687136 \cdot 10^{-101}\right):\\
\;\;\;\;\left(x \cdot 2\right) \cdot \frac{y}{x - y}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x \cdot 2}{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}} \cdot \frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}}\right) \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{\sqrt[3]{x - y}}}\\
\end{array}double f(double x, double y) {
double r660551 = x;
double r660552 = 2.0;
double r660553 = r660551 * r660552;
double r660554 = y;
double r660555 = r660553 * r660554;
double r660556 = r660551 - r660554;
double r660557 = r660555 / r660556;
return r660557;
}
double f(double x, double y) {
double r660558 = y;
double r660559 = -6.819752026637394e-42;
bool r660560 = r660558 <= r660559;
double r660561 = 3.147408210159048e-101;
bool r660562 = r660558 <= r660561;
double r660563 = !r660562;
bool r660564 = r660560 || r660563;
double r660565 = x;
double r660566 = 2.0;
double r660567 = r660565 * r660566;
double r660568 = r660565 - r660558;
double r660569 = r660558 / r660568;
double r660570 = r660567 * r660569;
double r660571 = cbrt(r660568);
double r660572 = r660571 * r660571;
double r660573 = r660567 / r660572;
double r660574 = cbrt(r660558);
double r660575 = r660574 * r660574;
double r660576 = cbrt(r660572);
double r660577 = r660575 / r660576;
double r660578 = r660573 * r660577;
double r660579 = cbrt(r660571);
double r660580 = r660574 / r660579;
double r660581 = r660578 * r660580;
double r660582 = r660564 ? r660570 : r660581;
return r660582;
}




Bits error versus x




Bits error versus y
Results
| Original | 14.9 |
|---|---|
| Target | 0.3 |
| Herbie | 1.1 |
if y < -6.819752026637394e-42 or 3.147408210159048e-101 < y Initial program 13.3
rmApplied *-un-lft-identity13.3
Applied times-frac0.7
Simplified0.7
if -6.819752026637394e-42 < y < 3.147408210159048e-101Initial program 17.5
rmApplied add-cube-cbrt18.4
Applied times-frac6.8
rmApplied add-cube-cbrt6.9
Applied cbrt-prod7.0
Applied add-cube-cbrt7.0
Applied times-frac7.0
Applied associate-*r*1.8
Final simplification1.1
herbie shell --seed 2019362 +o rules:numerics
(FPCore (x y)
:name "Linear.Projection:perspective from linear-1.19.1.3, B"
:precision binary64
:herbie-target
(if (< x -1.7210442634149447e+81) (* (/ (* 2 x) (- x y)) y) (if (< x 83645045635564432) (/ (* x 2) (/ (- x y) y)) (* (/ (* 2 x) (- x y)) y)))
(/ (* (* x 2) y) (- x y)))