\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -4.120156288663160099262452246870941235987 \cdot 10^{50} \lor \neg \left(x \le 1.115898472191414701666743120923343257633 \cdot 10^{-9}\right):\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) \cdot x + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{x}\\
\end{array}double f(double x, double y) {
double r310646 = x;
double r310647 = y;
double r310648 = r310646 + r310647;
double r310649 = r310646 / r310648;
double r310650 = log(r310649);
double r310651 = r310646 * r310650;
double r310652 = exp(r310651);
double r310653 = r310652 / r310646;
return r310653;
}
double f(double x, double y) {
double r310654 = x;
double r310655 = -4.12015628866316e+50;
bool r310656 = r310654 <= r310655;
double r310657 = 1.1158984721914147e-09;
bool r310658 = r310654 <= r310657;
double r310659 = !r310658;
bool r310660 = r310656 || r310659;
double r310661 = 1.0;
double r310662 = y;
double r310663 = exp(r310662);
double r310664 = r310654 * r310663;
double r310665 = r310661 / r310664;
double r310666 = 2.0;
double r310667 = cbrt(r310654);
double r310668 = r310654 + r310662;
double r310669 = cbrt(r310668);
double r310670 = r310667 / r310669;
double r310671 = log(r310670);
double r310672 = r310666 * r310671;
double r310673 = r310672 * r310654;
double r310674 = r310654 * r310671;
double r310675 = r310673 + r310674;
double r310676 = exp(r310675);
double r310677 = r310676 / r310654;
double r310678 = r310660 ? r310665 : r310677;
return r310678;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.1 |
|---|---|
| Target | 8.0 |
| Herbie | 0.4 |
if x < -4.12015628866316e+50 or 1.1158984721914147e-09 < x Initial program 11.7
Taylor expanded around inf 0.5
Simplified0.5
rmApplied neg-sub00.5
Applied exp-diff0.5
Applied associate-/l/0.5
if -4.12015628866316e+50 < x < 1.1158984721914147e-09Initial program 10.6
rmApplied add-cube-cbrt13.5
Applied add-cube-cbrt10.6
Applied times-frac10.6
Applied log-prod2.0
Applied distribute-lft-in2.0
Simplified0.2
Final simplification0.4
herbie shell --seed 2019303 +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))