\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{d} \cdot \left(e^{e} \cdot \left(\left(e^{a} \cdot e^{c}\right) \cdot e^{b}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r16340582 = e;
double r16340583 = d;
double r16340584 = r16340582 + r16340583;
double r16340585 = c;
double r16340586 = r16340584 + r16340585;
double r16340587 = b;
double r16340588 = r16340586 + r16340587;
double r16340589 = a;
double r16340590 = r16340588 + r16340589;
return r16340590;
}
double f(double a, double b, double c, double d, double e) {
double r16340591 = d;
double r16340592 = exp(r16340591);
double r16340593 = e;
double r16340594 = exp(r16340593);
double r16340595 = a;
double r16340596 = exp(r16340595);
double r16340597 = c;
double r16340598 = exp(r16340597);
double r16340599 = r16340596 * r16340598;
double r16340600 = b;
double r16340601 = exp(r16340600);
double r16340602 = r16340599 * r16340601;
double r16340603 = r16340594 * r16340602;
double r16340604 = r16340592 * r16340603;
double r16340605 = log(r16340604);
return r16340605;
}




Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d




Bits error versus e
Results
| Original | 0.4 |
|---|---|
| Target | 0.2 |
| Herbie | 0.0 |
Initial program 0.4
rmApplied add-log-exp0.4
Applied add-log-exp0.4
Applied add-log-exp0.4
Applied add-log-exp0.4
Applied sum-log0.4
Applied sum-log0.3
Applied sum-log0.2
Simplified0.3
rmApplied associate-+l+0.2
rmApplied add-log-exp0.2
Applied add-log-exp0.2
Applied add-log-exp0.2
Applied sum-log0.2
Applied sum-log0.2
Applied add-log-exp0.2
Applied sum-log0.2
Applied add-log-exp0.2
Applied sum-log0.0
Applied rem-exp-log0.0
Final simplification0.0
herbie shell --seed 2019124 +o rules:numerics
(FPCore (a b c d e)
:name "Expression 1, p15"
:pre (<= 1 a 2 b 4 c 8 d 16 e 32)
:herbie-target
(+ (+ d (+ c (+ a b))) e)
(+ (+ (+ (+ e d) c) b) a))