\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 r11043927 = e;
double r11043928 = d;
double r11043929 = r11043927 + r11043928;
double r11043930 = c;
double r11043931 = r11043929 + r11043930;
double r11043932 = b;
double r11043933 = r11043931 + r11043932;
double r11043934 = a;
double r11043935 = r11043933 + r11043934;
return r11043935;
}
double f(double a, double b, double c, double d, double e) {
double r11043936 = d;
double r11043937 = exp(r11043936);
double r11043938 = e;
double r11043939 = exp(r11043938);
double r11043940 = a;
double r11043941 = exp(r11043940);
double r11043942 = c;
double r11043943 = exp(r11043942);
double r11043944 = r11043941 * r11043943;
double r11043945 = b;
double r11043946 = exp(r11043945);
double r11043947 = r11043944 * r11043946;
double r11043948 = r11043939 * r11043947;
double r11043949 = r11043937 * r11043948;
double r11043950 = log(r11043949);
return r11043950;
}




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