\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 r15292926 = e;
double r15292927 = d;
double r15292928 = r15292926 + r15292927;
double r15292929 = c;
double r15292930 = r15292928 + r15292929;
double r15292931 = b;
double r15292932 = r15292930 + r15292931;
double r15292933 = a;
double r15292934 = r15292932 + r15292933;
return r15292934;
}
double f(double a, double b, double c, double d, double e) {
double r15292935 = d;
double r15292936 = exp(r15292935);
double r15292937 = e;
double r15292938 = exp(r15292937);
double r15292939 = a;
double r15292940 = exp(r15292939);
double r15292941 = c;
double r15292942 = exp(r15292941);
double r15292943 = r15292940 * r15292942;
double r15292944 = b;
double r15292945 = exp(r15292944);
double r15292946 = r15292943 * r15292945;
double r15292947 = r15292938 * r15292946;
double r15292948 = r15292936 * r15292947;
double r15292949 = log(r15292948);
return r15292949;
}




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
(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))