\left(\left(\left(e + d\right) + c\right) + b\right) + a
e + \left(\left(\left(b + d\right) + a\right) + c\right)
double f(double a, double b, double c, double d, double e) {
double r3775371 = e;
double r3775372 = d;
double r3775373 = r3775371 + r3775372;
double r3775374 = c;
double r3775375 = r3775373 + r3775374;
double r3775376 = b;
double r3775377 = r3775375 + r3775376;
double r3775378 = a;
double r3775379 = r3775377 + r3775378;
return r3775379;
}
double f(double a, double b, double c, double d, double e) {
double r3775380 = e;
double r3775381 = b;
double r3775382 = d;
double r3775383 = r3775381 + r3775382;
double r3775384 = a;
double r3775385 = r3775383 + r3775384;
double r3775386 = c;
double r3775387 = r3775385 + r3775386;
double r3775388 = r3775380 + r3775387;
return r3775388;
}




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.3 |
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 add-log-exp0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied rem-exp-log0.3
Taylor expanded around -inf 0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019130
(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))