\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 227.4569151677616218876210041344165802002 \lor \neg \left(y \le 1.480529159109445059080956924684942271604 \cdot 10^{146}\right):\\
\;\;\;\;\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{else}:\\
\;\;\;\;\frac{e^{x \cdot \log \left(\frac{1}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}} \cdot \frac{x}{\sqrt[3]{x + y}}\right)}}{x}\\
\end{array}double f(double x, double y) {
double r354678 = x;
double r354679 = y;
double r354680 = r354678 + r354679;
double r354681 = r354678 / r354680;
double r354682 = log(r354681);
double r354683 = r354678 * r354682;
double r354684 = exp(r354683);
double r354685 = r354684 / r354678;
return r354685;
}
double f(double x, double y) {
double r354686 = y;
double r354687 = 227.45691516776162;
bool r354688 = r354686 <= r354687;
double r354689 = 1.480529159109445e+146;
bool r354690 = r354686 <= r354689;
double r354691 = !r354690;
bool r354692 = r354688 || r354691;
double r354693 = x;
double r354694 = 2.0;
double r354695 = cbrt(r354693);
double r354696 = r354693 + r354686;
double r354697 = cbrt(r354696);
double r354698 = r354695 / r354697;
double r354699 = log(r354698);
double r354700 = r354694 * r354699;
double r354701 = r354693 * r354700;
double r354702 = r354693 * r354699;
double r354703 = r354701 + r354702;
double r354704 = exp(r354703);
double r354705 = r354704 / r354693;
double r354706 = 1.0;
double r354707 = r354697 * r354697;
double r354708 = r354706 / r354707;
double r354709 = r354693 / r354697;
double r354710 = r354708 * r354709;
double r354711 = log(r354710);
double r354712 = r354693 * r354711;
double r354713 = exp(r354712);
double r354714 = r354713 / r354693;
double r354715 = r354692 ? r354705 : r354714;
return r354715;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.7 |
| Herbie | 4.6 |
if y < 227.45691516776162 or 1.480529159109445e+146 < y Initial program 7.8
rmApplied add-cube-cbrt28.1
Applied add-cube-cbrt7.8
Applied times-frac7.8
Applied log-prod3.5
Applied distribute-lft-in3.5
Simplified2.1
if 227.45691516776162 < y < 1.480529159109445e+146Initial program 34.5
rmApplied add-cube-cbrt23.2
Applied *-un-lft-identity23.2
Applied times-frac23.2
Final simplification4.6
herbie shell --seed 2020001 +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))