\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{d} \cdot e^{a}\right) \cdot \left(\left(e^{c} \cdot e^{e}\right) \cdot e^{b}\right)\right)double f(double a, double b, double c, double d, double e) {
double r5319909 = e;
double r5319910 = d;
double r5319911 = r5319909 + r5319910;
double r5319912 = c;
double r5319913 = r5319911 + r5319912;
double r5319914 = b;
double r5319915 = r5319913 + r5319914;
double r5319916 = a;
double r5319917 = r5319915 + r5319916;
return r5319917;
}
double f(double a, double b, double c, double d, double e) {
double r5319918 = d;
double r5319919 = exp(r5319918);
double r5319920 = a;
double r5319921 = exp(r5319920);
double r5319922 = r5319919 * r5319921;
double r5319923 = c;
double r5319924 = exp(r5319923);
double r5319925 = e;
double r5319926 = exp(r5319925);
double r5319927 = r5319924 * r5319926;
double r5319928 = b;
double r5319929 = exp(r5319928);
double r5319930 = r5319927 * r5319929;
double r5319931 = r5319922 * r5319930;
double r5319932 = log(r5319931);
return r5319932;
}




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 associate-+l+0.3
rmApplied add-log-exp0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied add-log-exp0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied sum-log0.2
Simplified0.3
rmApplied add-log-exp0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied add-log-exp0.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 2019143
(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))