\left(\left(\left(e + d\right) + c\right) + b\right) + a
\left(\left(\left(e + c\right) + b\right) + a\right) + d
double f(double a, double b, double c, double d, double e) {
double r109938 = e;
double r109939 = d;
double r109940 = r109938 + r109939;
double r109941 = c;
double r109942 = r109940 + r109941;
double r109943 = b;
double r109944 = r109942 + r109943;
double r109945 = a;
double r109946 = r109944 + r109945;
return r109946;
}
double f(double a, double b, double c, double d, double e) {
double r109947 = e;
double r109948 = c;
double r109949 = r109947 + r109948;
double r109950 = b;
double r109951 = r109949 + r109950;
double r109952 = a;
double r109953 = r109951 + r109952;
double r109954 = d;
double r109955 = r109953 + r109954;
return r109955;
}




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 associate-+l+0.3
rmApplied distribute-rgt-in0.3
Applied associate-+l+0.3
Simplified0.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))