\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{c} \cdot e^{d}\right) \cdot \left(e^{a} \cdot \left(e^{e} \cdot e^{b}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r4586282 = e;
double r4586283 = d;
double r4586284 = r4586282 + r4586283;
double r4586285 = c;
double r4586286 = r4586284 + r4586285;
double r4586287 = b;
double r4586288 = r4586286 + r4586287;
double r4586289 = a;
double r4586290 = r4586288 + r4586289;
return r4586290;
}
double f(double a, double b, double c, double d, double e) {
double r4586291 = c;
double r4586292 = exp(r4586291);
double r4586293 = d;
double r4586294 = exp(r4586293);
double r4586295 = r4586292 * r4586294;
double r4586296 = a;
double r4586297 = exp(r4586296);
double r4586298 = e;
double r4586299 = exp(r4586298);
double r4586300 = b;
double r4586301 = exp(r4586300);
double r4586302 = r4586299 * r4586301;
double r4586303 = r4586297 * r4586302;
double r4586304 = r4586295 * r4586303;
double r4586305 = log(r4586304);
return r4586305;
}




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