\left(\left(\left(e + d\right) + c\right) + b\right) + a
e + \left(\left(b + \left(a + c\right)\right) + d\right)
double f(double a, double b, double c, double d, double e) {
double r4526107 = e;
double r4526108 = d;
double r4526109 = r4526107 + r4526108;
double r4526110 = c;
double r4526111 = r4526109 + r4526110;
double r4526112 = b;
double r4526113 = r4526111 + r4526112;
double r4526114 = a;
double r4526115 = r4526113 + r4526114;
return r4526115;
}
double f(double a, double b, double c, double d, double e) {
double r4526116 = e;
double r4526117 = b;
double r4526118 = a;
double r4526119 = c;
double r4526120 = r4526118 + r4526119;
double r4526121 = r4526117 + r4526120;
double r4526122 = d;
double r4526123 = r4526121 + r4526122;
double r4526124 = r4526116 + r4526123;
return r4526124;
}




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 add-log-exp0.4
Applied add-log-exp0.4
Applied sum-log0.4
Simplified0.3
rmApplied add-log-exp0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied add-log-exp0.3
Applied sum-log0.2
Applied rem-exp-log0.2
Taylor expanded around -inf 0.2
Simplified0.2
rmApplied associate-+l+0.2
Final simplification0.2
herbie shell --seed 2019130 +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))