\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 r21211953 = e;
double r21211954 = d;
double r21211955 = r21211953 + r21211954;
double r21211956 = c;
double r21211957 = r21211955 + r21211956;
double r21211958 = b;
double r21211959 = r21211957 + r21211958;
double r21211960 = a;
double r21211961 = r21211959 + r21211960;
return r21211961;
}
double f(double a, double b, double c, double d, double e) {
double r21211962 = d;
double r21211963 = exp(r21211962);
double r21211964 = e;
double r21211965 = exp(r21211964);
double r21211966 = a;
double r21211967 = exp(r21211966);
double r21211968 = c;
double r21211969 = exp(r21211968);
double r21211970 = r21211967 * r21211969;
double r21211971 = b;
double r21211972 = exp(r21211971);
double r21211973 = r21211970 * r21211972;
double r21211974 = r21211965 * r21211973;
double r21211975 = r21211963 * r21211974;
double r21211976 = log(r21211975);
return r21211976;
}




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