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 + \frac{1 \cdot 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 r428174 = x;
double r428175 = y;
double r428176 = z;
double r428177 = r428176 + r428175;
double r428178 = r428175 / r428177;
double r428179 = log(r428178);
double r428180 = r428175 * r428179;
double r428181 = exp(r428180);
double r428182 = r428181 / r428175;
double r428183 = r428174 + r428182;
return r428183;
}
double f(double x, double y, double z) {
double r428184 = y;
double r428185 = -1.1161118209519008e+42;
bool r428186 = r428184 <= r428185;
double r428187 = 1.2927406694831862;
bool r428188 = r428184 <= r428187;
double r428189 = !r428188;
bool r428190 = r428186 || r428189;
double r428191 = x;
double r428192 = 1.0;
double r428193 = -1.0;
double r428194 = z;
double r428195 = r428193 * r428194;
double r428196 = exp(r428195);
double r428197 = r428192 * r428196;
double r428198 = r428197 / r428184;
double r428199 = r428191 + r428198;
double r428200 = exp(r428184);
double r428201 = r428194 + r428184;
double r428202 = r428184 / r428201;
double r428203 = log(r428202);
double r428204 = pow(r428200, r428203);
double r428205 = r428204 / r428184;
double r428206 = r428191 + r428205;
double r428207 = r428190 ? r428199 : r428206;
return r428207;
}




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
rmApplied *-un-lft-identity2.4
Applied *-un-lft-identity2.4
Applied times-frac2.4
Applied log-prod2.4
Applied distribute-lft-in2.4
Applied exp-sum2.4
Simplified2.4
Simplified2.4
Taylor expanded around inf 0.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 +o rules:numerics
(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)))