\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{b} \cdot e^{e}\right) \cdot \left(e^{a} \cdot \left(e^{c} \cdot e^{d}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r4894019 = e;
double r4894020 = d;
double r4894021 = r4894019 + r4894020;
double r4894022 = c;
double r4894023 = r4894021 + r4894022;
double r4894024 = b;
double r4894025 = r4894023 + r4894024;
double r4894026 = a;
double r4894027 = r4894025 + r4894026;
return r4894027;
}
double f(double a, double b, double c, double d, double e) {
double r4894028 = b;
double r4894029 = exp(r4894028);
double r4894030 = e;
double r4894031 = exp(r4894030);
double r4894032 = r4894029 * r4894031;
double r4894033 = a;
double r4894034 = exp(r4894033);
double r4894035 = c;
double r4894036 = exp(r4894035);
double r4894037 = d;
double r4894038 = exp(r4894037);
double r4894039 = r4894036 * r4894038;
double r4894040 = r4894034 * r4894039;
double r4894041 = r4894032 * r4894040;
double r4894042 = log(r4894041);
return r4894042;
}




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 sum-log0.4
Applied sum-log0.3
Simplified0.3
rmApplied add-log-exp0.3
Applied add-log-exp0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied sum-log0.2
Applied add-log-exp0.2
Applied add-log-exp0.2
Applied sum-log0.2
Applied sum-log0.0
Applied rem-exp-log0.0
Final simplification0.0
herbie shell --seed 2019149
(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))