\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -6855000109145468998274891760271360:\\
\;\;\;\;\sqrt{e^{-1 \cdot y}} \cdot \frac{\sqrt{e^{-1 \cdot y}}}{x}\\
\mathbf{elif}\;x \le 0.5062656618457485047102295538934413343668:\\
\;\;\;\;\frac{e^{x \cdot 0}}{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\sqrt{e^{-1 \cdot y}}} \cdot \frac{{\left(\sqrt{\sqrt{e^{-1 \cdot y}}}\right)}^{3}}{x}\\
\end{array}double f(double x, double y) {
double r372776 = x;
double r372777 = y;
double r372778 = r372776 + r372777;
double r372779 = r372776 / r372778;
double r372780 = log(r372779);
double r372781 = r372776 * r372780;
double r372782 = exp(r372781);
double r372783 = r372782 / r372776;
return r372783;
}
double f(double x, double y) {
double r372784 = x;
double r372785 = -6.855000109145469e+33;
bool r372786 = r372784 <= r372785;
double r372787 = -1.0;
double r372788 = y;
double r372789 = r372787 * r372788;
double r372790 = exp(r372789);
double r372791 = sqrt(r372790);
double r372792 = r372791 / r372784;
double r372793 = r372791 * r372792;
double r372794 = 0.5062656618457485;
bool r372795 = r372784 <= r372794;
double r372796 = 0.0;
double r372797 = r372784 * r372796;
double r372798 = exp(r372797);
double r372799 = r372798 / r372784;
double r372800 = sqrt(r372791);
double r372801 = 3.0;
double r372802 = pow(r372800, r372801);
double r372803 = r372802 / r372784;
double r372804 = r372800 * r372803;
double r372805 = r372795 ? r372799 : r372804;
double r372806 = r372786 ? r372793 : r372805;
return r372806;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.5 |
|---|---|
| Target | 8.2 |
| Herbie | 0.5 |
if x < -6.855000109145469e+33Initial program 12.4
Taylor expanded around inf 0.0
rmApplied *-un-lft-identity0.0
Applied add-sqr-sqrt0.1
Applied times-frac0.1
Simplified0.1
if -6.855000109145469e+33 < x < 0.5062656618457485Initial program 11.9
Taylor expanded around inf 1.0
if 0.5062656618457485 < x Initial program 10.3
Taylor expanded around inf 0.1
rmApplied *-un-lft-identity0.1
Applied add-sqr-sqrt0.1
Applied times-frac0.1
Simplified0.1
rmApplied add-sqr-sqrt0.1
Applied sqrt-prod0.1
Applied associate-*l*0.1
Simplified0.1
Final simplification0.5
herbie shell --seed 2019322
(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))