\frac{\left(x \cdot 2\right) \cdot y}{x - y}\begin{array}{l}
\mathbf{if}\;y \le -6.819752026637393519506049512320603510099 \cdot 10^{-42}:\\
\;\;\;\;\left(x \cdot 2\right) \cdot \frac{y}{x - y}\\
\mathbf{elif}\;y \le 3.147408210159048214381836933498385687136 \cdot 10^{-101}:\\
\;\;\;\;\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 r688356 = x;
double r688357 = 2.0;
double r688358 = r688356 * r688357;
double r688359 = y;
double r688360 = r688358 * r688359;
double r688361 = r688356 - r688359;
double r688362 = r688360 / r688361;
return r688362;
}
double f(double x, double y) {
double r688363 = y;
double r688364 = -6.819752026637394e-42;
bool r688365 = r688363 <= r688364;
double r688366 = x;
double r688367 = 2.0;
double r688368 = r688366 * r688367;
double r688369 = r688366 - r688363;
double r688370 = r688363 / r688369;
double r688371 = r688368 * r688370;
double r688372 = 3.147408210159048e-101;
bool r688373 = r688363 <= r688372;
double r688374 = cbrt(r688369);
double r688375 = r688374 * r688374;
double r688376 = r688368 / r688375;
double r688377 = cbrt(r688363);
double r688378 = r688377 * r688377;
double r688379 = cbrt(r688375);
double r688380 = r688378 / r688379;
double r688381 = r688376 * r688380;
double r688382 = cbrt(r688374);
double r688383 = r688377 / r688382;
double r688384 = r688381 * r688383;
double r688385 = r688369 / r688363;
double r688386 = r688368 / r688385;
double r688387 = r688373 ? r688384 : r688386;
double r688388 = r688365 ? r688371 : r688387;
return r688388;
}




Bits error versus x




Bits error versus y
Results
| Original | 14.9 |
|---|---|
| Target | 0.3 |
| Herbie | 1.1 |
if y < -6.819752026637394e-42Initial program 13.8
rmApplied *-un-lft-identity13.8
Applied times-frac0.2
Simplified0.2
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
if 3.147408210159048e-101 < y Initial program 12.9
rmApplied associate-/l*1.2
Final simplification1.1
herbie shell --seed 2019362
(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)))