\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \le 51088118733.370209 \lor \neg \left(y \le 5.2341794267542068 \cdot 10^{118}\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{x}{\left(x + y\right) \cdot \left(x - y\right)} \cdot \left(x - y\right)\right)}}{x}\\
\end{array}double f(double x, double y) {
double r1135188 = x;
double r1135189 = y;
double r1135190 = r1135188 + r1135189;
double r1135191 = r1135188 / r1135190;
double r1135192 = log(r1135191);
double r1135193 = r1135188 * r1135192;
double r1135194 = exp(r1135193);
double r1135195 = r1135194 / r1135188;
return r1135195;
}
double f(double x, double y) {
double r1135196 = y;
double r1135197 = 51088118733.37021;
bool r1135198 = r1135196 <= r1135197;
double r1135199 = 5.234179426754207e+118;
bool r1135200 = r1135196 <= r1135199;
double r1135201 = !r1135200;
bool r1135202 = r1135198 || r1135201;
double r1135203 = x;
double r1135204 = 2.0;
double r1135205 = cbrt(r1135203);
double r1135206 = r1135203 + r1135196;
double r1135207 = cbrt(r1135206);
double r1135208 = r1135205 / r1135207;
double r1135209 = log(r1135208);
double r1135210 = r1135204 * r1135209;
double r1135211 = r1135203 * r1135210;
double r1135212 = r1135203 * r1135209;
double r1135213 = r1135211 + r1135212;
double r1135214 = exp(r1135213);
double r1135215 = r1135214 / r1135203;
double r1135216 = r1135203 - r1135196;
double r1135217 = r1135206 * r1135216;
double r1135218 = r1135203 / r1135217;
double r1135219 = r1135218 * r1135216;
double r1135220 = log(r1135219);
double r1135221 = r1135203 * r1135220;
double r1135222 = exp(r1135221);
double r1135223 = r1135222 / r1135203;
double r1135224 = r1135202 ? r1135215 : r1135223;
return r1135224;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.9 |
|---|---|
| Target | 8.2 |
| Herbie | 5.3 |
if y < 51088118733.37021 or 5.234179426754207e+118 < y Initial program 8.4
rmApplied add-cube-cbrt28.3
Applied add-cube-cbrt8.5
Applied times-frac8.5
Applied log-prod4.3
Applied distribute-lft-in4.3
Simplified3.1
if 51088118733.37021 < y < 5.234179426754207e+118Initial program 34.8
rmApplied flip-+24.2
Applied associate-/r/27.5
rmApplied difference-of-squares27.5
Final simplification5.3
herbie shell --seed 2020047
(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))