\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \le -7.3893711893619755 \cdot 10^{115} \lor \neg \left(x \le 8.4574501416202074 \cdot 10^{-18}\right):\\
\;\;\;\;\frac{e^{-1 \cdot y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + y} \cdot \sqrt[3]{x + y}}\right)}^{x} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}double f(double x, double y) {
double r377016 = x;
double r377017 = y;
double r377018 = r377016 + r377017;
double r377019 = r377016 / r377018;
double r377020 = log(r377019);
double r377021 = r377016 * r377020;
double r377022 = exp(r377021);
double r377023 = r377022 / r377016;
return r377023;
}
double f(double x, double y) {
double r377024 = x;
double r377025 = -7.3893711893619755e+115;
bool r377026 = r377024 <= r377025;
double r377027 = 8.457450141620207e-18;
bool r377028 = r377024 <= r377027;
double r377029 = !r377028;
bool r377030 = r377026 || r377029;
double r377031 = -1.0;
double r377032 = y;
double r377033 = r377031 * r377032;
double r377034 = exp(r377033);
double r377035 = r377034 / r377024;
double r377036 = cbrt(r377024);
double r377037 = r377036 * r377036;
double r377038 = r377024 + r377032;
double r377039 = cbrt(r377038);
double r377040 = r377039 * r377039;
double r377041 = r377037 / r377040;
double r377042 = pow(r377041, r377024);
double r377043 = r377036 / r377039;
double r377044 = pow(r377043, r377024);
double r377045 = r377042 * r377044;
double r377046 = r377045 / r377024;
double r377047 = r377030 ? r377035 : r377046;
return r377047;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 7.9 |
| Herbie | 1.9 |
if x < -7.3893711893619755e+115 or 8.457450141620207e-18 < x Initial program 10.8
Simplified10.8
Taylor expanded around inf 0.9
Simplified0.9
if -7.3893711893619755e+115 < x < 8.457450141620207e-18Initial program 11.0
Simplified11.0
rmApplied add-cube-cbrt17.2
Applied add-cube-cbrt11.0
Applied times-frac11.0
Applied unpow-prod-down2.8
Final simplification1.9
herbie shell --seed 2020081
(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))