x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}x + \frac{{\left(e^{y}\right)}^{\left(\log \left(\frac{y}{z + y}\right)\right)}}{y}double f(double x, double y, double z) {
double r383142 = x;
double r383143 = y;
double r383144 = z;
double r383145 = r383144 + r383143;
double r383146 = r383143 / r383145;
double r383147 = log(r383146);
double r383148 = r383143 * r383147;
double r383149 = exp(r383148);
double r383150 = r383149 / r383143;
double r383151 = r383142 + r383150;
return r383151;
}
double f(double x, double y, double z) {
double r383152 = x;
double r383153 = y;
double r383154 = exp(r383153);
double r383155 = z;
double r383156 = r383155 + r383153;
double r383157 = r383153 / r383156;
double r383158 = log(r383157);
double r383159 = pow(r383154, r383158);
double r383160 = r383159 / r383153;
double r383161 = r383152 + r383160;
return r383161;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.0 |
|---|---|
| Target | 1.0 |
| Herbie | 1.1 |
Initial program 6.0
rmApplied add-log-exp36.0
Applied exp-to-pow1.1
Final simplification1.1
herbie shell --seed 2020046 +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)))