\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 r14578637 = x;
double r14578638 = y;
double r14578639 = r14578637 + r14578638;
double r14578640 = r14578637 / r14578639;
double r14578641 = log(r14578640);
double r14578642 = r14578637 * r14578641;
double r14578643 = exp(r14578642);
double r14578644 = r14578643 / r14578637;
return r14578644;
}
double f(double x, double y) {
double r14578645 = x;
double r14578646 = -7.224948756571171e+34;
bool r14578647 = r14578645 <= r14578646;
double r14578648 = 1.0;
double r14578649 = r14578648 / r14578645;
double r14578650 = y;
double r14578651 = -r14578650;
double r14578652 = exp(r14578651);
double r14578653 = r14578649 * r14578652;
double r14578654 = 95.61454861569655;
bool r14578655 = r14578645 <= r14578654;
double r14578656 = cbrt(r14578645);
double r14578657 = r14578650 + r14578645;
double r14578658 = cbrt(r14578657);
double r14578659 = r14578656 / r14578658;
double r14578660 = log(r14578659);
double r14578661 = r14578660 + r14578660;
double r14578662 = r14578660 + r14578661;
double r14578663 = r14578645 * r14578662;
double r14578664 = exp(r14578663);
double r14578665 = r14578664 * r14578649;
double r14578666 = r14578655 ? r14578665 : r14578653;
double r14578667 = r14578647 ? r14578653 : r14578666;
return r14578667;
}




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