\left(\left(\left(e + d\right) + c\right) + b\right) + a
a + \left(\left(\left(b + e\right) + c\right) + d\right)
double f(double a, double b, double c, double d, double e) {
double r110413 = e;
double r110414 = d;
double r110415 = r110413 + r110414;
double r110416 = c;
double r110417 = r110415 + r110416;
double r110418 = b;
double r110419 = r110417 + r110418;
double r110420 = a;
double r110421 = r110419 + r110420;
return r110421;
}
double f(double a, double b, double c, double d, double e) {
double r110422 = a;
double r110423 = b;
double r110424 = e;
double r110425 = r110423 + r110424;
double r110426 = c;
double r110427 = r110425 + r110426;
double r110428 = d;
double r110429 = r110427 + r110428;
double r110430 = r110422 + r110429;
return r110430;
}




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 *-un-lft-identity0.4
Applied *-un-lft-identity0.4
Applied distribute-lft-out0.4
Simplified0.4
rmApplied distribute-rgt-in0.4
Applied associate-+l+0.4
Simplified0.4
rmApplied associate-+r+0.3
Final simplification0.3
herbie shell --seed 2020001
(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))