\left(\left(\left(e + d\right) + c\right) + b\right) + a
e + \left(d + \left(\left(b + a\right) + c\right)\right)
double f(double a, double b, double c, double d, double e) {
double r1617713 = e;
double r1617714 = d;
double r1617715 = r1617713 + r1617714;
double r1617716 = c;
double r1617717 = r1617715 + r1617716;
double r1617718 = b;
double r1617719 = r1617717 + r1617718;
double r1617720 = a;
double r1617721 = r1617719 + r1617720;
return r1617721;
}
double f(double a, double b, double c, double d, double e) {
double r1617722 = e;
double r1617723 = d;
double r1617724 = b;
double r1617725 = a;
double r1617726 = r1617724 + r1617725;
double r1617727 = c;
double r1617728 = r1617726 + r1617727;
double r1617729 = r1617723 + r1617728;
double r1617730 = r1617722 + r1617729;
return r1617730;
}




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 2019153 +o rules:numerics
(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))