\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{e} \cdot e^{d}\right) \cdot \left(e^{a} \cdot \left(e^{c} \cdot e^{b}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r4714084 = e;
double r4714085 = d;
double r4714086 = r4714084 + r4714085;
double r4714087 = c;
double r4714088 = r4714086 + r4714087;
double r4714089 = b;
double r4714090 = r4714088 + r4714089;
double r4714091 = a;
double r4714092 = r4714090 + r4714091;
return r4714092;
}
double f(double a, double b, double c, double d, double e) {
double r4714093 = e;
double r4714094 = exp(r4714093);
double r4714095 = d;
double r4714096 = exp(r4714095);
double r4714097 = r4714094 * r4714096;
double r4714098 = a;
double r4714099 = exp(r4714098);
double r4714100 = c;
double r4714101 = exp(r4714100);
double r4714102 = b;
double r4714103 = exp(r4714102);
double r4714104 = r4714101 * r4714103;
double r4714105 = r4714099 * r4714104;
double r4714106 = r4714097 * r4714105;
double r4714107 = log(r4714106);
return r4714107;
}




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