\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{c} \cdot \left(\left(e^{e} \cdot e^{d}\right) \cdot \left(e^{b} \cdot e^{a}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r79870 = e;
double r79871 = d;
double r79872 = r79870 + r79871;
double r79873 = c;
double r79874 = r79872 + r79873;
double r79875 = b;
double r79876 = r79874 + r79875;
double r79877 = a;
double r79878 = r79876 + r79877;
return r79878;
}
double f(double a, double b, double c, double d, double e) {
double r79879 = c;
double r79880 = exp(r79879);
double r79881 = e;
double r79882 = exp(r79881);
double r79883 = d;
double r79884 = exp(r79883);
double r79885 = r79882 * r79884;
double r79886 = b;
double r79887 = exp(r79886);
double r79888 = a;
double r79889 = exp(r79888);
double r79890 = r79887 * r79889;
double r79891 = r79885 * r79890;
double r79892 = r79880 * r79891;
double r79893 = log(r79892);
return r79893;
}




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
Simplified0.3
rmApplied add-log-exp0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied add-log-exp0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied sum-log0.0
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 add-log-exp0.3
Applied sum-log0.3
Applied sum-log0.2
Applied sum-log0.0
Applied rem-exp-log0.0
Final simplification0.0
herbie shell --seed 2019195 +o rules:numerics
(FPCore (a b c d e)
:name "Expression 1, p15"
:pre (<= 1.0 a 2.0 b 4.0 c 8.0 d 16.0 e 32.0)
:herbie-target
(+ (+ d (+ c (+ a b))) e)
(+ (+ (+ (+ e d) c) b) a))