\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^{\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right) \cdot x + 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 r1013485 = x;
double r1013486 = y;
double r1013487 = r1013485 + r1013486;
double r1013488 = r1013485 / r1013487;
double r1013489 = log(r1013488);
double r1013490 = r1013485 * r1013489;
double r1013491 = exp(r1013490);
double r1013492 = r1013491 / r1013485;
return r1013492;
}
double f(double x, double y) {
double r1013493 = y;
double r1013494 = 51088118733.37021;
bool r1013495 = r1013493 <= r1013494;
double r1013496 = 5.234179426754207e+118;
bool r1013497 = r1013493 <= r1013496;
double r1013498 = !r1013497;
bool r1013499 = r1013495 || r1013498;
double r1013500 = 2.0;
double r1013501 = x;
double r1013502 = cbrt(r1013501);
double r1013503 = r1013501 + r1013493;
double r1013504 = cbrt(r1013503);
double r1013505 = r1013502 / r1013504;
double r1013506 = log(r1013505);
double r1013507 = r1013500 * r1013506;
double r1013508 = r1013507 * r1013501;
double r1013509 = r1013501 * r1013506;
double r1013510 = r1013508 + r1013509;
double r1013511 = exp(r1013510);
double r1013512 = r1013511 / r1013501;
double r1013513 = r1013501 - r1013493;
double r1013514 = r1013503 * r1013513;
double r1013515 = r1013501 / r1013514;
double r1013516 = r1013515 * r1013513;
double r1013517 = log(r1013516);
double r1013518 = r1013501 * r1013517;
double r1013519 = exp(r1013518);
double r1013520 = r1013519 / r1013501;
double r1013521 = r1013499 ? r1013512 : r1013520;
return r1013521;
}




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