\frac{\left(x \cdot 2\right) \cdot y}{x - y}\begin{array}{l}
\mathbf{if}\;x \le -8.31176856225810498717589484339856368443 \cdot 10^{108} \lor \neg \left(x \le 9.562858780549262910479627469187876635734 \cdot 10^{83}\right):\\
\;\;\;\;\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}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 2}{\frac{x - y}{y}}\\
\end{array}double f(double x, double y) {
double r608499 = x;
double r608500 = 2.0;
double r608501 = r608499 * r608500;
double r608502 = y;
double r608503 = r608501 * r608502;
double r608504 = r608499 - r608502;
double r608505 = r608503 / r608504;
return r608505;
}
double f(double x, double y) {
double r608506 = x;
double r608507 = -8.311768562258105e+108;
bool r608508 = r608506 <= r608507;
double r608509 = 9.562858780549263e+83;
bool r608510 = r608506 <= r608509;
double r608511 = !r608510;
bool r608512 = r608508 || r608511;
double r608513 = 2.0;
double r608514 = r608506 * r608513;
double r608515 = y;
double r608516 = r608506 - r608515;
double r608517 = cbrt(r608516);
double r608518 = r608517 * r608517;
double r608519 = r608514 / r608518;
double r608520 = cbrt(r608515);
double r608521 = r608520 * r608520;
double r608522 = cbrt(r608518);
double r608523 = r608521 / r608522;
double r608524 = r608519 * r608523;
double r608525 = cbrt(r608517);
double r608526 = r608520 / r608525;
double r608527 = r608524 * r608526;
double r608528 = r608516 / r608515;
double r608529 = r608514 / r608528;
double r608530 = r608512 ? r608527 : r608529;
return r608530;
}




Bits error versus x




Bits error versus y
Results
| Original | 14.4 |
|---|---|
| Target | 0.4 |
| Herbie | 1.3 |
if x < -8.311768562258105e+108 or 9.562858780549263e+83 < x Initial program 19.8
rmApplied add-cube-cbrt20.6
Applied times-frac7.4
rmApplied add-cube-cbrt7.5
Applied cbrt-prod7.6
Applied add-cube-cbrt7.7
Applied times-frac7.7
Applied associate-*r*1.8
if -8.311768562258105e+108 < x < 9.562858780549263e+83Initial program 11.6
rmApplied associate-/l*1.1
Final simplification1.3
herbie shell --seed 2019351 +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)))