\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -72249487565711714357348322366193664:\\
\;\;\;\;\frac{1}{x} \cdot e^{-y}\\
\mathbf{elif}\;x \le 95.6145486156965489499270915985107421875:\\
\;\;\;\;e^{x \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right) + \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right)\right)\right)} \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x} \cdot e^{-y}\\
\end{array}double f(double x, double y) {
double r23152131 = x;
double r23152132 = y;
double r23152133 = r23152131 + r23152132;
double r23152134 = r23152131 / r23152133;
double r23152135 = log(r23152134);
double r23152136 = r23152131 * r23152135;
double r23152137 = exp(r23152136);
double r23152138 = r23152137 / r23152131;
return r23152138;
}
double f(double x, double y) {
double r23152139 = x;
double r23152140 = -7.224948756571171e+34;
bool r23152141 = r23152139 <= r23152140;
double r23152142 = 1.0;
double r23152143 = r23152142 / r23152139;
double r23152144 = y;
double r23152145 = -r23152144;
double r23152146 = exp(r23152145);
double r23152147 = r23152143 * r23152146;
double r23152148 = 95.61454861569655;
bool r23152149 = r23152139 <= r23152148;
double r23152150 = cbrt(r23152139);
double r23152151 = r23152144 + r23152139;
double r23152152 = cbrt(r23152151);
double r23152153 = r23152150 / r23152152;
double r23152154 = log(r23152153);
double r23152155 = r23152154 + r23152154;
double r23152156 = r23152154 + r23152155;
double r23152157 = r23152139 * r23152156;
double r23152158 = exp(r23152157);
double r23152159 = r23152158 * r23152143;
double r23152160 = r23152149 ? r23152159 : r23152147;
double r23152161 = r23152141 ? r23152147 : r23152160;
return r23152161;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.6 |
| Herbie | 0.0 |
if x < -7.224948756571171e+34 or 95.61454861569655 < x Initial program 11.2
Taylor expanded around inf 0.0
Simplified0.0
rmApplied div-inv0.0
if -7.224948756571171e+34 < x < 95.61454861569655Initial program 10.5
rmApplied div-inv10.5
rmApplied add-cube-cbrt12.1
Applied add-cube-cbrt10.5
Applied times-frac10.5
Applied log-prod1.8
Simplified0.1
Final simplification0.0
herbie shell --seed 2019172
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
:herbie-target
(if (< y -3.7311844206647956e+94) (/ (exp (/ -1.0 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.0 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))