\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 r1742579 = e;
double r1742580 = d;
double r1742581 = r1742579 + r1742580;
double r1742582 = c;
double r1742583 = r1742581 + r1742582;
double r1742584 = b;
double r1742585 = r1742583 + r1742584;
double r1742586 = a;
double r1742587 = r1742585 + r1742586;
return r1742587;
}
double f(double a, double b, double c, double d, double e) {
double r1742588 = e;
double r1742589 = d;
double r1742590 = b;
double r1742591 = a;
double r1742592 = r1742590 + r1742591;
double r1742593 = c;
double r1742594 = r1742592 + r1742593;
double r1742595 = r1742589 + r1742594;
double r1742596 = r1742588 + r1742595;
return r1742596;
}




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))