\left(\left(\left(e + d\right) + c\right) + b\right) + a
\left(e + d\right) + \left(a + \left(b + c\right)\right)
double code(double a, double b, double c, double d, double e) {
return ((double) (((double) (((double) (((double) (e + d)) + c)) + b)) + a));
}
double code(double a, double b, double c, double d, double e) {
return ((double) (((double) (e + d)) + ((double) (a + ((double) (b + c))))));
}




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
Simplified0.3
Final simplification0.3
herbie shell --seed 2020150
(FPCore (a b c d e)
:name "Expression 1, p15"
:precision binary64
: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))