\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{d} \cdot \left(e^{e} \cdot \left(\left(e^{a} \cdot e^{c}\right) \cdot e^{b}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r16957908 = e;
double r16957909 = d;
double r16957910 = r16957908 + r16957909;
double r16957911 = c;
double r16957912 = r16957910 + r16957911;
double r16957913 = b;
double r16957914 = r16957912 + r16957913;
double r16957915 = a;
double r16957916 = r16957914 + r16957915;
return r16957916;
}
double f(double a, double b, double c, double d, double e) {
double r16957917 = d;
double r16957918 = exp(r16957917);
double r16957919 = e;
double r16957920 = exp(r16957919);
double r16957921 = a;
double r16957922 = exp(r16957921);
double r16957923 = c;
double r16957924 = exp(r16957923);
double r16957925 = r16957922 * r16957924;
double r16957926 = b;
double r16957927 = exp(r16957926);
double r16957928 = r16957925 * r16957927;
double r16957929 = r16957920 * r16957928;
double r16957930 = r16957918 * r16957929;
double r16957931 = log(r16957930);
return r16957931;
}




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 sum-log0.3
Applied add-log-exp0.3
Applied sum-log0.2
Applied rem-exp-log0.2
rmApplied exp-sum0.0
Applied associate-*l*0.0
Final simplification0.0
herbie shell --seed 2019120
(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))