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 r16176878 = x;
double r16176879 = y;
double r16176880 = z;
double r16176881 = r16176880 + r16176879;
double r16176882 = r16176879 / r16176881;
double r16176883 = log(r16176882);
double r16176884 = r16176879 * r16176883;
double r16176885 = exp(r16176884);
double r16176886 = r16176885 / r16176879;
double r16176887 = r16176878 + r16176886;
return r16176887;
}
double f(double x, double y, double z) {
double r16176888 = y;
double r16176889 = 0.06656101021950764;
bool r16176890 = r16176888 <= r16176889;
double r16176891 = x;
double r16176892 = 1.0;
double r16176893 = r16176892 / r16176888;
double r16176894 = r16176891 + r16176893;
double r16176895 = z;
double r16176896 = exp(r16176895);
double r16176897 = r16176888 * r16176896;
double r16176898 = r16176892 / r16176897;
double r16176899 = r16176891 + r16176898;
double r16176900 = r16176890 ? r16176894 : r16176899;
return r16176900;
}




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