\left(\left(\left(e + d\right) + c\right) + b\right) + a
\left(c + \left(a + \left(d + b\right)\right)\right) + \log \left(e^{e}\right)double f(double a, double b, double c, double d, double e) {
double r4120794 = e;
double r4120795 = d;
double r4120796 = r4120794 + r4120795;
double r4120797 = c;
double r4120798 = r4120796 + r4120797;
double r4120799 = b;
double r4120800 = r4120798 + r4120799;
double r4120801 = a;
double r4120802 = r4120800 + r4120801;
return r4120802;
}
double f(double a, double b, double c, double d, double e) {
double r4120803 = c;
double r4120804 = a;
double r4120805 = d;
double r4120806 = b;
double r4120807 = r4120805 + r4120806;
double r4120808 = r4120804 + r4120807;
double r4120809 = r4120803 + r4120808;
double r4120810 = e;
double r4120811 = exp(r4120810);
double r4120812 = log(r4120811);
double r4120813 = r4120809 + r4120812;
return r4120813;
}




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 add-log-exp0.4
Applied add-log-exp0.4
Applied add-log-exp0.4
Applied add-log-exp0.4
Applied sum-log0.4
Applied sum-log0.3
Applied sum-log0.2
Simplified0.3
rmApplied exp-sum0.3
Applied log-prod0.3
Applied associate-+l+0.3
Simplified0.3
rmApplied associate-+l+0.3
Final simplification0.3
herbie shell --seed 2019141 +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))