\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{e} \cdot \left(e^{a} \cdot \left(\left(e^{c} \cdot e^{d}\right) \cdot e^{b}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r4096897 = e;
double r4096898 = d;
double r4096899 = r4096897 + r4096898;
double r4096900 = c;
double r4096901 = r4096899 + r4096900;
double r4096902 = b;
double r4096903 = r4096901 + r4096902;
double r4096904 = a;
double r4096905 = r4096903 + r4096904;
return r4096905;
}
double f(double a, double b, double c, double d, double e) {
double r4096906 = e;
double r4096907 = exp(r4096906);
double r4096908 = a;
double r4096909 = exp(r4096908);
double r4096910 = c;
double r4096911 = exp(r4096910);
double r4096912 = d;
double r4096913 = exp(r4096912);
double r4096914 = r4096911 * r4096913;
double r4096915 = b;
double r4096916 = exp(r4096915);
double r4096917 = r4096914 * r4096916;
double r4096918 = r4096909 * r4096917;
double r4096919 = r4096907 * r4096918;
double r4096920 = log(r4096919);
return r4096920;
}




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.0 |
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 add-log-exp0.3
Applied add-log-exp0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied add-log-exp0.3
Applied sum-log0.2
Applied add-log-exp0.2
Applied sum-log0.2
Applied sum-log0.0
Applied rem-exp-log0.0
Final simplification0.0
herbie shell --seed 2019133 +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))