\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -3.9722026627658497 \cdot 10^{40}:\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{elif}\;x \le 0.0031732446158843622:\\
\;\;\;\;\frac{\left({\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}\right) \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x \cdot e^{y}}\\
\end{array}double f(double x, double y) {
double r411121 = x;
double r411122 = y;
double r411123 = r411121 + r411122;
double r411124 = r411121 / r411123;
double r411125 = log(r411124);
double r411126 = r411121 * r411125;
double r411127 = exp(r411126);
double r411128 = r411127 / r411121;
return r411128;
}
double f(double x, double y) {
double r411129 = x;
double r411130 = -3.9722026627658497e+40;
bool r411131 = r411129 <= r411130;
double r411132 = -1.0;
double r411133 = y;
double r411134 = r411132 * r411133;
double r411135 = exp(r411134);
double r411136 = r411135 / r411129;
double r411137 = 0.003173244615884362;
bool r411138 = r411129 <= r411137;
double r411139 = cbrt(r411129);
double r411140 = r411129 + r411133;
double r411141 = cbrt(r411140);
double r411142 = r411139 / r411141;
double r411143 = pow(r411142, r411129);
double r411144 = r411143 * r411143;
double r411145 = r411144 * r411143;
double r411146 = r411145 / r411129;
double r411147 = 1.0;
double r411148 = exp(r411133);
double r411149 = r411129 * r411148;
double r411150 = r411147 / r411149;
double r411151 = r411138 ? r411146 : r411150;
double r411152 = r411131 ? r411136 : r411151;
return r411152;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.0 |
|---|---|
| Target | 8.2 |
| Herbie | 0.1 |
if x < -3.9722026627658497e+40Initial program 13.6
Simplified13.6
Taylor expanded around inf 0.0
Simplified0.0
if -3.9722026627658497e+40 < x < 0.003173244615884362Initial program 10.8
Simplified10.8
rmApplied add-cube-cbrt12.7
Applied add-cube-cbrt10.8
Applied times-frac10.8
Applied unpow-prod-down2.3
rmApplied times-frac2.3
Applied unpow-prod-down0.2
if 0.003173244615884362 < x Initial program 9.6
Simplified9.6
Taylor expanded around inf 0.2
Simplified0.2
rmApplied clear-num0.2
Simplified0.2
Final simplification0.1
herbie shell --seed 2020083 +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.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))