\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -13729826306381823925551104 \lor \neg \left(x \le 8.344763779755203003674068895634263753891\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right)} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r337650 = x;
double r337651 = y;
double r337652 = r337650 + r337651;
double r337653 = r337650 / r337652;
double r337654 = log(r337653);
double r337655 = r337650 * r337654;
double r337656 = exp(r337655);
double r337657 = r337656 / r337650;
return r337657;
}
double f(double x, double y) {
double r337658 = x;
double r337659 = -1.3729826306381824e+25;
bool r337660 = r337658 <= r337659;
double r337661 = 8.344763779755203;
bool r337662 = r337658 <= r337661;
double r337663 = !r337662;
bool r337664 = r337660 || r337663;
double r337665 = y;
double r337666 = -r337665;
double r337667 = exp(r337666);
double r337668 = r337667 / r337658;
double r337669 = 2.0;
double r337670 = cbrt(r337658);
double r337671 = r337658 + r337665;
double r337672 = cbrt(r337671);
double r337673 = r337670 / r337672;
double r337674 = log(r337673);
double r337675 = r337669 * r337674;
double r337676 = r337658 * r337675;
double r337677 = exp(r337676);
double r337678 = pow(r337673, r337658);
double r337679 = r337677 * r337678;
double r337680 = r337679 / r337658;
double r337681 = r337664 ? r337668 : r337680;
return r337681;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.3 |
|---|---|
| Target | 7.4 |
| Herbie | 0.0 |
if x < -1.3729826306381824e+25 or 8.344763779755203 < x Initial program 11.0
Simplified11.0
Taylor expanded around inf 0.0
if -1.3729826306381824e+25 < x < 8.344763779755203Initial program 11.7
Simplified11.7
rmApplied add-cube-cbrt12.5
Applied add-cube-cbrt11.7
Applied times-frac11.7
Applied unpow-prod-down2.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.3
Simplified0.1
Final simplification0.0
herbie shell --seed 2019305
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
:precision binary64
:herbie-target
(if (< y -3.73118442066479561e94) (/ (exp (/ -1 y)) x) (if (< y 2.81795924272828789e37) (/ (pow (/ x (+ y x)) x) x) (if (< y 2.347387415166998e178) (log (exp (/ (pow (/ x (+ y x)) x) x))) (/ (exp (/ -1 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))