\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -274.47601542862543:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{elif}\;x \le 9.888607073668458 \cdot 10^{-12}:\\
\;\;\;\;\frac{{\left(e^{\sqrt[3]{x} \cdot \sqrt[3]{x}}\right)}^{\left(\log \left(\frac{x}{y + x}\right) \cdot \sqrt[3]{x}\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{-y}}{x}\\
\end{array}double f(double x, double y) {
double r20150803 = x;
double r20150804 = y;
double r20150805 = r20150803 + r20150804;
double r20150806 = r20150803 / r20150805;
double r20150807 = log(r20150806);
double r20150808 = r20150803 * r20150807;
double r20150809 = exp(r20150808);
double r20150810 = r20150809 / r20150803;
return r20150810;
}
double f(double x, double y) {
double r20150811 = x;
double r20150812 = -274.47601542862543;
bool r20150813 = r20150811 <= r20150812;
double r20150814 = y;
double r20150815 = -r20150814;
double r20150816 = exp(r20150815);
double r20150817 = r20150816 / r20150811;
double r20150818 = 9.888607073668458e-12;
bool r20150819 = r20150811 <= r20150818;
double r20150820 = cbrt(r20150811);
double r20150821 = r20150820 * r20150820;
double r20150822 = exp(r20150821);
double r20150823 = r20150814 + r20150811;
double r20150824 = r20150811 / r20150823;
double r20150825 = log(r20150824);
double r20150826 = r20150825 * r20150820;
double r20150827 = pow(r20150822, r20150826);
double r20150828 = r20150827 / r20150811;
double r20150829 = r20150819 ? r20150828 : r20150817;
double r20150830 = r20150813 ? r20150817 : r20150829;
return r20150830;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.2 |
|---|---|
| Target | 7.9 |
| Herbie | 0.3 |
if x < -274.47601542862543 or 9.888607073668458e-12 < x Initial program 11.1
Taylor expanded around inf 0.5
Simplified0.5
if -274.47601542862543 < x < 9.888607073668458e-12Initial program 11.2
rmApplied add-log-exp11.3
Applied exp-to-pow0.1
rmApplied add-cube-cbrt0.1
Applied exp-prod0.1
Applied pow-pow0.0
Final simplification0.3
herbie shell --seed 2019162 +o rules:numerics
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
: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))