\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 193392245631.92206:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{x}\\
\mathbf{elif}\;y \le 3.17466847436457891 \cdot 10^{67}:\\
\;\;\;\;\frac{e^{x \cdot \log \left(\frac{\frac{x}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}}{\sqrt[3]{x + y}}\right)}}{x}\\
\mathbf{elif}\;y \le 3.9061854843159141 \cdot 10^{81}:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{x}\\
\mathbf{elif}\;y \le 6.7514169676994134 \cdot 10^{146}:\\
\;\;\;\;\frac{e^{x \cdot \log \left(\frac{x}{x \cdot x - y \cdot y} \cdot \left(x - y\right)\right)}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}}{x}\\
\end{array}double f(double x, double y) {
double r428657 = x;
double r428658 = y;
double r428659 = r428657 + r428658;
double r428660 = r428657 / r428659;
double r428661 = log(r428660);
double r428662 = r428657 * r428661;
double r428663 = exp(r428662);
double r428664 = r428663 / r428657;
return r428664;
}
double f(double x, double y) {
double r428665 = y;
double r428666 = 193392245631.92206;
bool r428667 = r428665 <= r428666;
double r428668 = x;
double r428669 = 2.0;
double r428670 = cbrt(r428668);
double r428671 = r428668 + r428665;
double r428672 = cbrt(r428671);
double r428673 = r428670 / r428672;
double r428674 = log(r428673);
double r428675 = r428669 * r428674;
double r428676 = r428668 * r428675;
double r428677 = r428668 * r428674;
double r428678 = r428676 + r428677;
double r428679 = exp(r428678);
double r428680 = r428679 / r428668;
double r428681 = 3.174668474364579e+67;
bool r428682 = r428665 <= r428681;
double r428683 = r428672 * r428672;
double r428684 = r428668 / r428683;
double r428685 = r428684 / r428672;
double r428686 = log(r428685);
double r428687 = r428668 * r428686;
double r428688 = exp(r428687);
double r428689 = r428688 / r428668;
double r428690 = 3.906185484315914e+81;
bool r428691 = r428665 <= r428690;
double r428692 = 6.751416967699413e+146;
bool r428693 = r428665 <= r428692;
double r428694 = r428668 * r428668;
double r428695 = r428665 * r428665;
double r428696 = r428694 - r428695;
double r428697 = r428668 / r428696;
double r428698 = r428668 - r428665;
double r428699 = r428697 * r428698;
double r428700 = log(r428699);
double r428701 = r428668 * r428700;
double r428702 = exp(r428701);
double r428703 = r428702 / r428668;
double r428704 = r428693 ? r428703 : r428680;
double r428705 = r428691 ? r428680 : r428704;
double r428706 = r428682 ? r428689 : r428705;
double r428707 = r428667 ? r428680 : r428706;
return r428707;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.5 |
|---|---|
| Target | 8.3 |
| Herbie | 5.8 |
if y < 193392245631.92206 or 3.174668474364579e+67 < y < 3.906185484315914e+81 or 6.751416967699413e+146 < y Initial program 8.7
rmApplied add-cube-cbrt28.4
Applied add-cube-cbrt8.8
Applied times-frac8.8
Applied log-prod4.7
Applied distribute-lft-in4.7
Simplified3.4
if 193392245631.92206 < y < 3.174668474364579e+67Initial program 39.1
rmApplied add-cube-cbrt25.0
Applied associate-/r*25.6
if 3.906185484315914e+81 < y < 6.751416967699413e+146Initial program 32.7
rmApplied flip-+21.1
Applied associate-/r/28.3
Final simplification5.8
herbie shell --seed 2020100
(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))