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 r414630 = x;
double r414631 = y;
double r414632 = z;
double r414633 = r414632 + r414631;
double r414634 = r414631 / r414633;
double r414635 = log(r414634);
double r414636 = r414631 * r414635;
double r414637 = exp(r414636);
double r414638 = r414637 / r414631;
double r414639 = r414630 + r414638;
return r414639;
}
double f(double x, double y, double z) {
double r414640 = x;
double r414641 = y;
double r414642 = exp(r414641);
double r414643 = z;
double r414644 = r414643 + r414641;
double r414645 = r414641 / r414644;
double r414646 = log(r414645);
double r414647 = pow(r414642, r414646);
double r414648 = r414647 / r414641;
double r414649 = r414640 + r414648;
return r414649;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 5.6 |
|---|---|
| Target | 0.2 |
| Herbie | 0.3 |
Initial program 5.6
rmApplied add-log-exp33.6
Applied exp-to-pow0.3
Final simplification0.3
herbie shell --seed 2020021
(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)))