\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{e} \cdot e^{d}\right) \cdot \left(e^{a} \cdot \left(e^{c} \cdot e^{b}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r4394942 = e;
double r4394943 = d;
double r4394944 = r4394942 + r4394943;
double r4394945 = c;
double r4394946 = r4394944 + r4394945;
double r4394947 = b;
double r4394948 = r4394946 + r4394947;
double r4394949 = a;
double r4394950 = r4394948 + r4394949;
return r4394950;
}
double f(double a, double b, double c, double d, double e) {
double r4394951 = e;
double r4394952 = exp(r4394951);
double r4394953 = d;
double r4394954 = exp(r4394953);
double r4394955 = r4394952 * r4394954;
double r4394956 = a;
double r4394957 = exp(r4394956);
double r4394958 = c;
double r4394959 = exp(r4394958);
double r4394960 = b;
double r4394961 = exp(r4394960);
double r4394962 = r4394959 * r4394961;
double r4394963 = r4394957 * r4394962;
double r4394964 = r4394955 * r4394963;
double r4394965 = log(r4394964);
return r4394965;
}




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