\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -828189259607921993226743361594940456960:\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\mathbf{elif}\;x \le 2.66965085530503376531896719825454056263:\\
\;\;\;\;e^{\left(2 \cdot x\right) \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\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 r260761 = x;
double r260762 = y;
double r260763 = r260761 + r260762;
double r260764 = r260761 / r260763;
double r260765 = log(r260764);
double r260766 = r260761 * r260765;
double r260767 = exp(r260766);
double r260768 = r260767 / r260761;
return r260768;
}
double f(double x, double y) {
double r260769 = x;
double r260770 = -8.28189259607922e+38;
bool r260771 = r260769 <= r260770;
double r260772 = 1.0;
double r260773 = y;
double r260774 = exp(r260773);
double r260775 = r260769 * r260774;
double r260776 = r260772 / r260775;
double r260777 = 2.6696508553050338;
bool r260778 = r260769 <= r260777;
double r260779 = 2.0;
double r260780 = r260779 * r260769;
double r260781 = cbrt(r260769);
double r260782 = r260769 + r260773;
double r260783 = cbrt(r260782);
double r260784 = r260781 / r260783;
double r260785 = log(r260784);
double r260786 = r260780 * r260785;
double r260787 = exp(r260786);
double r260788 = pow(r260784, r260769);
double r260789 = r260788 / r260769;
double r260790 = r260787 * r260789;
double r260791 = -r260773;
double r260792 = exp(r260791);
double r260793 = r260792 / r260769;
double r260794 = r260778 ? r260790 : r260793;
double r260795 = r260771 ? r260776 : r260794;
return r260795;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 8.1 |
| Herbie | 0.1 |
if x < -8.28189259607922e+38Initial program 13.7
Simplified13.7
Taylor expanded around inf 0.0
rmApplied clear-num0.0
Simplified0.0
if -8.28189259607922e+38 < x < 2.6696508553050338Initial program 11.4
Simplified11.4
rmApplied *-un-lft-identity11.4
Applied add-cube-cbrt13.2
Applied add-cube-cbrt11.4
Applied times-frac11.4
Applied unpow-prod-down2.2
Applied times-frac2.2
Simplified2.2
rmApplied add-exp-log34.5
Applied add-exp-log34.5
Applied prod-exp34.5
Applied add-exp-log34.5
Applied add-exp-log34.5
Applied prod-exp34.5
Applied div-exp34.5
Applied pow-exp33.4
Simplified0.2
if 2.6696508553050338 < x Initial program 9.4
Simplified9.4
Taylor expanded around inf 0.1
Final simplification0.1
herbie shell --seed 2019347 +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))