\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{d} \cdot e^{a}\right) \cdot \left(e^{e} \cdot \left(e^{c} \cdot e^{b}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r4816363 = e;
double r4816364 = d;
double r4816365 = r4816363 + r4816364;
double r4816366 = c;
double r4816367 = r4816365 + r4816366;
double r4816368 = b;
double r4816369 = r4816367 + r4816368;
double r4816370 = a;
double r4816371 = r4816369 + r4816370;
return r4816371;
}
double f(double a, double b, double c, double d, double e) {
double r4816372 = d;
double r4816373 = exp(r4816372);
double r4816374 = a;
double r4816375 = exp(r4816374);
double r4816376 = r4816373 * r4816375;
double r4816377 = e;
double r4816378 = exp(r4816377);
double r4816379 = c;
double r4816380 = exp(r4816379);
double r4816381 = b;
double r4816382 = exp(r4816381);
double r4816383 = r4816380 * r4816382;
double r4816384 = r4816378 * r4816383;
double r4816385 = r4816376 * r4816384;
double r4816386 = log(r4816385);
return r4816386;
}




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