\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 r347670 = x;
double r347671 = y;
double r347672 = r347670 + r347671;
double r347673 = r347670 / r347672;
double r347674 = log(r347673);
double r347675 = r347670 * r347674;
double r347676 = exp(r347675);
double r347677 = r347676 / r347670;
return r347677;
}
double f(double x, double y) {
double r347678 = x;
double r347679 = -1.3729826306381824e+25;
bool r347680 = r347678 <= r347679;
double r347681 = 8.344763779755203;
bool r347682 = r347678 <= r347681;
double r347683 = !r347682;
bool r347684 = r347680 || r347683;
double r347685 = y;
double r347686 = -r347685;
double r347687 = exp(r347686);
double r347688 = r347687 / r347678;
double r347689 = 2.0;
double r347690 = cbrt(r347678);
double r347691 = r347678 + r347685;
double r347692 = cbrt(r347691);
double r347693 = r347690 / r347692;
double r347694 = log(r347693);
double r347695 = r347689 * r347694;
double r347696 = r347678 * r347695;
double r347697 = exp(r347696);
double r347698 = pow(r347693, r347678);
double r347699 = r347697 * r347698;
double r347700 = r347699 / r347678;
double r347701 = r347684 ? r347688 : r347700;
return r347701;
}




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 +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.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))