\frac{\left(x \cdot 2\right) \cdot y}{x - y}\begin{array}{l}
\mathbf{if}\;y \le -5.57636306111153486 \cdot 10^{137} \lor \neg \left(y \le 2.19553327371823438 \cdot 10^{93}\right):\\
\;\;\;\;\frac{x \cdot 2}{\sqrt[3]{{\left(\frac{x}{y} - 1\right)}^{3}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x - y} \cdot \left(y \cdot 2\right)\\
\end{array}double f(double x, double y) {
double r486719 = x;
double r486720 = 2.0;
double r486721 = r486719 * r486720;
double r486722 = y;
double r486723 = r486721 * r486722;
double r486724 = r486719 - r486722;
double r486725 = r486723 / r486724;
return r486725;
}
double f(double x, double y) {
double r486726 = y;
double r486727 = -5.576363061111535e+137;
bool r486728 = r486726 <= r486727;
double r486729 = 2.1955332737182344e+93;
bool r486730 = r486726 <= r486729;
double r486731 = !r486730;
bool r486732 = r486728 || r486731;
double r486733 = x;
double r486734 = 2.0;
double r486735 = r486733 * r486734;
double r486736 = r486733 / r486726;
double r486737 = 1.0;
double r486738 = r486736 - r486737;
double r486739 = 3.0;
double r486740 = pow(r486738, r486739);
double r486741 = cbrt(r486740);
double r486742 = r486735 / r486741;
double r486743 = r486733 - r486726;
double r486744 = r486733 / r486743;
double r486745 = r486726 * r486734;
double r486746 = r486744 * r486745;
double r486747 = r486732 ? r486742 : r486746;
return r486747;
}




Bits error versus x




Bits error versus y
Results
| Original | 14.7 |
|---|---|
| Target | 0.3 |
| Herbie | 1.5 |
if y < -5.576363061111535e+137 or 2.1955332737182344e+93 < y Initial program 20.8
rmApplied associate-/l*0.0
rmApplied add-cbrt-cube62.5
Applied add-cbrt-cube63.1
Applied cbrt-undiv63.1
Simplified2.1
if -5.576363061111535e+137 < y < 2.1955332737182344e+93Initial program 12.0
rmApplied associate-/l*11.0
rmApplied div-inv11.2
Applied times-frac1.4
Simplified1.2
Final simplification1.5
herbie shell --seed 2020062
(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)))