x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\begin{array}{l}
\mathbf{if}\;y \le 0.06656101021950764:\\
\;\;\;\;x + \frac{1}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{y \cdot e^{z}}\\
\end{array}double f(double x, double y, double z) {
double r21931220 = x;
double r21931221 = y;
double r21931222 = z;
double r21931223 = r21931222 + r21931221;
double r21931224 = r21931221 / r21931223;
double r21931225 = log(r21931224);
double r21931226 = r21931221 * r21931225;
double r21931227 = exp(r21931226);
double r21931228 = r21931227 / r21931221;
double r21931229 = r21931220 + r21931228;
return r21931229;
}
double f(double x, double y, double z) {
double r21931230 = y;
double r21931231 = 0.06656101021950764;
bool r21931232 = r21931230 <= r21931231;
double r21931233 = x;
double r21931234 = 1.0;
double r21931235 = r21931234 / r21931230;
double r21931236 = r21931233 + r21931235;
double r21931237 = z;
double r21931238 = exp(r21931237);
double r21931239 = r21931230 * r21931238;
double r21931240 = r21931234 / r21931239;
double r21931241 = r21931233 + r21931240;
double r21931242 = r21931232 ? r21931236 : r21931241;
return r21931242;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.0 |
|---|---|
| Target | 1.1 |
| Herbie | 0.8 |
if y < 0.06656101021950764Initial program 7.7
Taylor expanded around inf 1.2
if 0.06656101021950764 < y Initial program 2.0
Taylor expanded around inf 0.0
Simplified0.0
rmApplied exp-neg0.0
Applied associate-/l/0.0
Final simplification0.8
herbie shell --seed 2019163 +o rules:numerics
(FPCore (x y z)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, G"
: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)))