\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 r22398368 = x;
double r22398369 = y;
double r22398370 = r22398368 + r22398369;
double r22398371 = r22398368 / r22398370;
double r22398372 = log(r22398371);
double r22398373 = r22398368 * r22398372;
double r22398374 = exp(r22398373);
double r22398375 = r22398374 / r22398368;
return r22398375;
}
double f(double x, double y) {
double r22398376 = x;
double r22398377 = -7.224948756571171e+34;
bool r22398378 = r22398376 <= r22398377;
double r22398379 = 1.0;
double r22398380 = r22398379 / r22398376;
double r22398381 = y;
double r22398382 = -r22398381;
double r22398383 = exp(r22398382);
double r22398384 = r22398380 * r22398383;
double r22398385 = 95.61454861569655;
bool r22398386 = r22398376 <= r22398385;
double r22398387 = cbrt(r22398376);
double r22398388 = r22398381 + r22398376;
double r22398389 = cbrt(r22398388);
double r22398390 = r22398387 / r22398389;
double r22398391 = log(r22398390);
double r22398392 = r22398391 + r22398391;
double r22398393 = r22398391 + r22398392;
double r22398394 = r22398376 * r22398393;
double r22398395 = exp(r22398394);
double r22398396 = r22398395 * r22398380;
double r22398397 = r22398386 ? r22398396 : r22398384;
double r22398398 = r22398378 ? r22398384 : r22398397;
return r22398398;
}




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))