\frac{\left(x \cdot 2\right) \cdot y}{x - y}\begin{array}{l}
\mathbf{if}\;x \le -1.182159587378012480642358586488428991674 \cdot 10^{70} \lor \neg \left(x \le 6.512387421164835240080292418646396765453 \cdot 10^{90}\right):\\
\;\;\;\;\frac{\frac{x \cdot 2}{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}}{\sqrt[3]{\sqrt[3]{x - y} \cdot \sqrt[3]{x - y}}} \cdot \frac{y}{\sqrt[3]{\sqrt[3]{x - y}}}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2\right) \cdot \frac{y}{x - y}\\
\end{array}double f(double x, double y) {
double r467458 = x;
double r467459 = 2.0;
double r467460 = r467458 * r467459;
double r467461 = y;
double r467462 = r467460 * r467461;
double r467463 = r467458 - r467461;
double r467464 = r467462 / r467463;
return r467464;
}
double f(double x, double y) {
double r467465 = x;
double r467466 = -1.1821595873780125e+70;
bool r467467 = r467465 <= r467466;
double r467468 = 6.512387421164835e+90;
bool r467469 = r467465 <= r467468;
double r467470 = !r467469;
bool r467471 = r467467 || r467470;
double r467472 = 2.0;
double r467473 = r467465 * r467472;
double r467474 = y;
double r467475 = r467465 - r467474;
double r467476 = cbrt(r467475);
double r467477 = r467476 * r467476;
double r467478 = r467473 / r467477;
double r467479 = cbrt(r467477);
double r467480 = r467478 / r467479;
double r467481 = cbrt(r467476);
double r467482 = r467474 / r467481;
double r467483 = r467480 * r467482;
double r467484 = r467474 / r467475;
double r467485 = r467473 * r467484;
double r467486 = r467471 ? r467483 : r467485;
return r467486;
}




Bits error versus x




Bits error versus y
Results
| Original | 14.7 |
|---|---|
| Target | 0.3 |
| Herbie | 1.4 |
if x < -1.1821595873780125e+70 or 6.512387421164835e+90 < x Initial program 20.6
rmApplied add-cube-cbrt21.4
Applied times-frac6.7
rmApplied add-cube-cbrt6.7
Applied cbrt-prod6.8
Applied *-un-lft-identity6.8
Applied times-frac6.8
Applied associate-*r*2.5
Simplified2.5
if -1.1821595873780125e+70 < x < 6.512387421164835e+90Initial program 11.3
rmApplied *-un-lft-identity11.3
Applied times-frac0.8
Simplified0.8
Final simplification1.4
herbie shell --seed 2019208 +o rules:numerics
(FPCore (x y)
:name "Linear.Projection:perspective from linear-1.19.1.3, B"
:precision binary64
:herbie-target
(if (< x -1.7210442634149447e81) (* (/ (* 2 x) (- x y)) y) (if (< x 83645045635564432) (/ (* x 2) (/ (- x y) y)) (* (/ (* 2 x) (- x y)) y)))
(/ (* (* x 2) y) (- x y)))