double f(double a, double b, double c, double d, double e) {
double r14646940 = e;
double r14646941 = d;
double r14646942 = r14646940 + r14646941;
double r14646943 = c;
double r14646944 = r14646942 + r14646943;
double r14646945 = b;
double r14646946 = r14646944 + r14646945;
double r14646947 = a;
double r14646948 = r14646946 + r14646947;
return r14646948;
}
double f(double a, double b, double c, double d, double e) {
double r14646949 = e;
double r14646950 = exp(r14646949);
double r14646951 = a;
double r14646952 = exp(r14646951);
double r14646953 = b;
double r14646954 = exp(r14646953);
double r14646955 = d;
double r14646956 = exp(r14646955);
double r14646957 = c;
double r14646958 = exp(r14646957);
double r14646959 = r14646956 * r14646958;
double r14646960 = r14646954 * r14646959;
double r14646961 = r14646952 * r14646960;
double r14646962 = r14646950 * r14646961;
double r14646963 = log(r14646962);
return r14646963;
}
\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{e} \cdot \left(e^{a} \cdot \left(e^{b} \cdot \left(e^{d} \cdot e^{c}\right)\right)\right)\right)



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d




Bits error versus e
| 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.1
Simplified0.3
Taylor expanded around inf 0.3
rmApplied 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 add-log-exp0.2
Applied sum-log0.0
Applied rem-exp-log0.0
Final simplification0.0
herbie shell --seed 2019101 +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))