\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 r7487231 = e;
double r7487232 = d;
double r7487233 = r7487231 + r7487232;
double r7487234 = c;
double r7487235 = r7487233 + r7487234;
double r7487236 = b;
double r7487237 = r7487235 + r7487236;
double r7487238 = a;
double r7487239 = r7487237 + r7487238;
return r7487239;
}
double f(double a, double b, double c, double d, double e) {
double r7487240 = e;
double r7487241 = d;
double r7487242 = c;
double r7487243 = r7487241 + r7487242;
double r7487244 = b;
double r7487245 = a;
double r7487246 = r7487244 + r7487245;
double r7487247 = r7487243 + r7487246;
double r7487248 = r7487240 + r7487247;
return r7487248;
}




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.2 |
Initial program 0.4
rmApplied associate-+l+0.3
rmApplied associate-+l+0.3
rmApplied associate-+l+0.2
Final simplification0.2
herbie shell --seed 2019174 +o rules:numerics
(FPCore (a b c d e)
:name "Expression 1, p15"
:pre (<= 1.0 a 2.0 b 4.0 c 8.0 d 16.0 e 32.0)
:herbie-target
(+ (+ d (+ c (+ a b))) e)
(+ (+ (+ (+ e d) c) b) a))