\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{a} \cdot e^{c}\right) \cdot \left(\left(e^{d} \cdot e^{e}\right) \cdot e^{b}\right)\right)double f(double a, double b, double c, double d, double e) {
double r4087020 = e;
double r4087021 = d;
double r4087022 = r4087020 + r4087021;
double r4087023 = c;
double r4087024 = r4087022 + r4087023;
double r4087025 = b;
double r4087026 = r4087024 + r4087025;
double r4087027 = a;
double r4087028 = r4087026 + r4087027;
return r4087028;
}
double f(double a, double b, double c, double d, double e) {
double r4087029 = a;
double r4087030 = exp(r4087029);
double r4087031 = c;
double r4087032 = exp(r4087031);
double r4087033 = r4087030 * r4087032;
double r4087034 = d;
double r4087035 = exp(r4087034);
double r4087036 = e;
double r4087037 = exp(r4087036);
double r4087038 = r4087035 * r4087037;
double r4087039 = b;
double r4087040 = exp(r4087039);
double r4087041 = r4087038 * r4087040;
double r4087042 = r4087033 * r4087041;
double r4087043 = log(r4087042);
return r4087043;
}




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