\left(\left(\left(e + d\right) + c\right) + b\right) + a
e + \left(\left(d + c\right) + \left(b + a\right)\right)
double f(double a, double b, double c, double d, double e) {
double r78307 = e;
double r78308 = d;
double r78309 = r78307 + r78308;
double r78310 = c;
double r78311 = r78309 + r78310;
double r78312 = b;
double r78313 = r78311 + r78312;
double r78314 = a;
double r78315 = r78313 + r78314;
return r78315;
}
double f(double a, double b, double c, double d, double e) {
double r78316 = e;
double r78317 = d;
double r78318 = c;
double r78319 = r78317 + r78318;
double r78320 = b;
double r78321 = a;
double r78322 = r78320 + r78321;
double r78323 = r78319 + r78322;
double r78324 = r78316 + r78323;
return r78324;
}




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 associate-+l+0.3
rmApplied associate-+l+0.3
rmApplied associate-+l+0.2
rmApplied associate-+r+0.3
Final simplification0.3
herbie shell --seed 2019326 +o rules:numerics
(FPCore (a b c d e)
:name "Expression 1, p15"
:precision binary64
:pre (<= 1 a 2 b 4 c 8 d 16 e 32)
:herbie-target
(+ (+ d (+ c (+ a b))) e)
(+ (+ (+ (+ e d) c) b) a))