x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\begin{array}{l}
\mathbf{if}\;y \le -1116111820951900757028957439299745235337000 \lor \neg \left(y \le 1.292740669483186222166182233195286244154\right):\\
\;\;\;\;x + \sqrt{e^{-1 \cdot z}} \cdot \frac{\sqrt{e^{-1 \cdot z}}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{{\left(e^{y}\right)}^{\left(\log \left(\frac{y}{z + y}\right)\right)}}{y}\\
\end{array}double f(double x, double y, double z) {
double r497490 = x;
double r497491 = y;
double r497492 = z;
double r497493 = r497492 + r497491;
double r497494 = r497491 / r497493;
double r497495 = log(r497494);
double r497496 = r497491 * r497495;
double r497497 = exp(r497496);
double r497498 = r497497 / r497491;
double r497499 = r497490 + r497498;
return r497499;
}
double f(double x, double y, double z) {
double r497500 = y;
double r497501 = -1.1161118209519008e+42;
bool r497502 = r497500 <= r497501;
double r497503 = 1.2927406694831862;
bool r497504 = r497500 <= r497503;
double r497505 = !r497504;
bool r497506 = r497502 || r497505;
double r497507 = x;
double r497508 = -1.0;
double r497509 = z;
double r497510 = r497508 * r497509;
double r497511 = exp(r497510);
double r497512 = sqrt(r497511);
double r497513 = r497512 / r497500;
double r497514 = r497512 * r497513;
double r497515 = r497507 + r497514;
double r497516 = exp(r497500);
double r497517 = r497509 + r497500;
double r497518 = r497500 / r497517;
double r497519 = log(r497518);
double r497520 = pow(r497516, r497519);
double r497521 = r497520 / r497500;
double r497522 = r497507 + r497521;
double r497523 = r497506 ? r497515 : r497522;
return r497523;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.1 |
|---|---|
| Target | 1.3 |
| Herbie | 0.1 |
if y < -1.1161118209519008e+42 or 1.2927406694831862 < y Initial program 2.4
Taylor expanded around inf 0.0
rmApplied *-un-lft-identity0.0
Applied add-sqr-sqrt0.0
Applied times-frac0.0
Simplified0.0
if -1.1161118209519008e+42 < y < 1.2927406694831862Initial program 9.8
rmApplied add-log-exp14.1
Applied exp-to-pow0.1
Final simplification0.1
herbie shell --seed 2020001
(FPCore (x y z)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, G"
:precision binary64
:herbie-target
(if (< (/ y (+ z y)) 7.1154157597908e-315) (+ x (/ (exp (/ -1 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))
(+ x (/ (exp (* y (log (/ y (+ z y))))) y)))