\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -3.98796217281238501 \cdot 10^{42}:\\
\;\;\;\;\frac{1}{e^{y} \cdot x}\\
\mathbf{elif}\;x \le 6065.9896509303089:\\
\;\;\;\;\left({\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{x} \cdot {\left(\left|\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right|\right)}^{x}\right) \cdot \frac{{\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\end{array}double f(double x, double y) {
double r365782 = x;
double r365783 = y;
double r365784 = r365782 + r365783;
double r365785 = r365782 / r365784;
double r365786 = log(r365785);
double r365787 = r365782 * r365786;
double r365788 = exp(r365787);
double r365789 = r365788 / r365782;
return r365789;
}
double f(double x, double y) {
double r365790 = x;
double r365791 = -3.987962172812385e+42;
bool r365792 = r365790 <= r365791;
double r365793 = 1.0;
double r365794 = y;
double r365795 = exp(r365794);
double r365796 = r365795 * r365790;
double r365797 = r365793 / r365796;
double r365798 = 6065.989650930309;
bool r365799 = r365790 <= r365798;
double r365800 = cbrt(r365790);
double r365801 = r365790 + r365794;
double r365802 = cbrt(r365801);
double r365803 = r365800 / r365802;
double r365804 = fabs(r365803);
double r365805 = pow(r365804, r365790);
double r365806 = r365805 * r365805;
double r365807 = pow(r365803, r365790);
double r365808 = r365807 / r365790;
double r365809 = r365806 * r365808;
double r365810 = -r365794;
double r365811 = exp(r365810);
double r365812 = r365811 / r365790;
double r365813 = r365799 ? r365809 : r365812;
double r365814 = r365792 ? r365797 : r365813;
return r365814;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.2 |
|---|---|
| Target | 8.0 |
| Herbie | 0.1 |
if x < -3.987962172812385e+42Initial program 14.1
Simplified14.1
Taylor expanded around inf 0.0
rmApplied neg-sub00.0
Applied exp-diff0.0
Applied associate-/l/0.1
Simplified0.1
if -3.987962172812385e+42 < x < 6065.989650930309Initial program 10.6
Simplified10.6
rmApplied *-un-lft-identity10.6
Applied add-cube-cbrt12.9
Applied add-cube-cbrt10.6
Applied times-frac10.6
Applied unpow-prod-down2.5
Applied times-frac2.5
Simplified2.5
rmApplied add-sqr-sqrt2.5
Applied unpow-prod-down2.5
Simplified2.5
Simplified0.1
if 6065.989650930309 < x Initial program 10.3
Simplified10.3
Taylor expanded around inf 0.0
Final simplification0.1
herbie shell --seed 2020045 +o rules:numerics
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
:precision binary64
:herbie-target
(if (< y -3.7311844206647956e+94) (/ (exp (/ -1 y)) x) (if (< y 2.817959242728288e+37) (/ (pow (/ x (+ y x)) x) x) (if (< y 2.347387415166998e+178) (log (exp (/ (pow (/ x (+ y x)) x) x))) (/ (exp (/ -1 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))