\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 r3581913 = e;
double r3581914 = d;
double r3581915 = r3581913 + r3581914;
double r3581916 = c;
double r3581917 = r3581915 + r3581916;
double r3581918 = b;
double r3581919 = r3581917 + r3581918;
double r3581920 = a;
double r3581921 = r3581919 + r3581920;
return r3581921;
}
double f(double a, double b, double c, double d, double e) {
double r3581922 = e;
double r3581923 = exp(r3581922);
double r3581924 = a;
double r3581925 = exp(r3581924);
double r3581926 = c;
double r3581927 = exp(r3581926);
double r3581928 = d;
double r3581929 = exp(r3581928);
double r3581930 = r3581927 * r3581929;
double r3581931 = b;
double r3581932 = exp(r3581931);
double r3581933 = r3581930 * r3581932;
double r3581934 = r3581925 * r3581933;
double r3581935 = r3581923 * r3581934;
double r3581936 = log(r3581935);
return r3581936;
}




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 2019132 +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))