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 r17740354 = x;
double r17740355 = y;
double r17740356 = z;
double r17740357 = r17740356 + r17740355;
double r17740358 = r17740355 / r17740357;
double r17740359 = log(r17740358);
double r17740360 = r17740355 * r17740359;
double r17740361 = exp(r17740360);
double r17740362 = r17740361 / r17740355;
double r17740363 = r17740354 + r17740362;
return r17740363;
}
double f(double x, double y, double z) {
double r17740364 = x;
double r17740365 = y;
double r17740366 = exp(r17740365);
double r17740367 = z;
double r17740368 = r17740365 + r17740367;
double r17740369 = r17740365 / r17740368;
double r17740370 = log(r17740369);
double r17740371 = pow(r17740366, r17740370);
double r17740372 = r17740371 / r17740365;
double r17740373 = r17740364 + r17740372;
return r17740373;
}




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 +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.0 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))
(+ x (/ (exp (* y (log (/ y (+ z y))))) y)))