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 r298561 = x;
double r298562 = y;
double r298563 = z;
double r298564 = r298563 + r298562;
double r298565 = r298562 / r298564;
double r298566 = log(r298565);
double r298567 = r298562 * r298566;
double r298568 = exp(r298567);
double r298569 = r298568 / r298562;
double r298570 = r298561 + r298569;
return r298570;
}
double f(double x, double y, double z) {
double r298571 = x;
double r298572 = y;
double r298573 = exp(r298572);
double r298574 = z;
double r298575 = r298574 + r298572;
double r298576 = r298572 / r298575;
double r298577 = log(r298576);
double r298578 = pow(r298573, r298577);
double r298579 = r298578 / r298572;
double r298580 = r298571 + r298579;
return r298580;
}




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-exp34.8
Applied exp-to-pow1.1
Final simplification1.1
herbie shell --seed 2019294
(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.1154157598e-315) (+ x (/ (exp (/ -1 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))
(+ x (/ (exp (* y (log (/ y (+ z y))))) y)))