1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\begin{array}{l}
\mathbf{if}\;y \leq -12172248.367177077 \lor \neg \left(y \leq 4.920744420668106 \cdot 10^{+33}\right):\\
\;\;\;\;x + \frac{x}{y} \cdot \left(\frac{1}{y} - 1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \left(\frac{1}{\sqrt[3]{y + 1} \cdot \sqrt[3]{y + 1}} \cdot \frac{x - 1}{\frac{\sqrt[3]{1 \cdot 1 - y \cdot y}}{\sqrt[3]{1 - y}}}\right)\\
\end{array}(FPCore (x y) :precision binary64 (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))))
(FPCore (x y)
:precision binary64
(if (or (<= y -12172248.367177077) (not (<= y 4.920744420668106e+33)))
(+ x (* (/ x y) (- (/ 1.0 y) 1.0)))
(+
1.0
(*
y
(*
(/ 1.0 (* (cbrt (+ y 1.0)) (cbrt (+ y 1.0))))
(/ (- x 1.0) (/ (cbrt (- (* 1.0 1.0) (* y y))) (cbrt (- 1.0 y)))))))))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 tmp;
if (((y <= -12172248.367177077) || !(y <= 4.920744420668106e+33))) {
tmp = ((double) (x + ((double) ((x / y) * ((double) ((1.0 / y) - 1.0))))));
} else {
tmp = ((double) (1.0 + ((double) (y * ((double) ((1.0 / ((double) (((double) cbrt(((double) (y + 1.0)))) * ((double) cbrt(((double) (y + 1.0))))))) * (((double) (x - 1.0)) / (((double) cbrt(((double) (((double) (1.0 * 1.0)) - ((double) (y * y)))))) / ((double) cbrt(((double) (1.0 - y))))))))))));
}
return tmp;
}




Bits error versus x




Bits error versus y
Results
| Original | 22.8 |
|---|---|
| Target | 0.3 |
| Herbie | 8.0 |
if y < -12172248.367177077 or 4.92074442066810616e33 < y Initial program Error: 46.2 bits
SimplifiedError: 29.7 bits
Taylor expanded around inf Error: 15.3 bits
SimplifiedError: 15.3 bits
if -12172248.367177077 < y < 4.92074442066810616e33Initial program Error: 1.3 bits
SimplifiedError: 1.2 bits
rmApplied add-cube-cbrtError: 1.3 bits
Applied *-un-lft-identityError: 1.3 bits
Applied times-fracError: 1.3 bits
rmApplied flip-+Error: 1.3 bits
Applied cbrt-divError: 1.3 bits
Final simplificationError: 8.0 bits
herbie shell --seed 2020203
(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))))