x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}x + \frac{{\left(e^{y}\right)}^{\left(\log \left(\frac{y}{y + z}\right)\right)}}{y}double f(double x, double y, double z) {
double r21374214 = x;
double r21374215 = y;
double r21374216 = z;
double r21374217 = r21374216 + r21374215;
double r21374218 = r21374215 / r21374217;
double r21374219 = log(r21374218);
double r21374220 = r21374215 * r21374219;
double r21374221 = exp(r21374220);
double r21374222 = r21374221 / r21374215;
double r21374223 = r21374214 + r21374222;
return r21374223;
}
double f(double x, double y, double z) {
double r21374224 = x;
double r21374225 = y;
double r21374226 = exp(r21374225);
double r21374227 = z;
double r21374228 = r21374225 + r21374227;
double r21374229 = r21374225 / r21374228;
double r21374230 = log(r21374229);
double r21374231 = pow(r21374226, r21374230);
double r21374232 = r21374231 / r21374225;
double r21374233 = r21374224 + r21374232;
return r21374233;
}




Bits error versus x




Bits error versus y




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