1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \le -2.5109143016052069 \cdot 10^{33} \lor \neg \left(y \le 9.60502204570401 \cdot 10^{34}\right):\\
\;\;\;\;x + \frac{x}{y} \cdot \left(\frac{1}{y} - 1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \frac{\frac{x - 1}{\sqrt[3]{{\left(\sqrt[3]{y + 1}\right)}^{6}}}}{\sqrt[3]{y + 1}}\\
\end{array}double code(double x, double y) {
return ((double) (1.0 - (((double) (((double) (1.0 - x)) * y)) / ((double) (y + 1.0)))));
}
double code(double x, double y) {
double VAR;
if (((y <= -2.510914301605207e+33) || !(y <= 9.605022045704014e+34))) {
VAR = ((double) (x + ((double) ((x / y) * ((double) ((1.0 / y) - 1.0))))));
} else {
VAR = ((double) (1.0 + ((double) (y * ((((double) (x - 1.0)) / ((double) cbrt(((double) pow(((double) cbrt(((double) (y + 1.0)))), 6.0))))) / ((double) cbrt(((double) (y + 1.0)))))))));
}
return VAR;
}




Bits error versus x




Bits error versus y
Results
| Original | 22.5 |
|---|---|
| Target | 0.3 |
| Herbie | 7.7 |
if y < -2.5109143016052069e33 or 9.60502204570401e34 < y Initial program 47.8
Simplified29.7
Taylor expanded around inf 14.3
Simplified14.3
if -2.5109143016052069e33 < y < 9.60502204570401e34Initial program 2.4
Simplified2.3
rmApplied add-cube-cbrt2.4
Applied associate-/r*2.4
rmApplied cbrt-unprod2.3
Simplified2.4
Final simplification7.7
herbie shell --seed 2020182
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, D"
:precision binary64
:herbie-target
(if (< y -3693.8482788297247) (- (/ 1.0 y) (- (/ x y) x)) (if (< y 6799310503.41891) (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))) (- (/ 1.0 y) (- (/ x y) x))))
(- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))))