\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{c} \cdot e^{d}\right) \cdot \left(\left(e^{b} \cdot e^{a}\right) \cdot e^{e}\right)\right)double f(double a, double b, double c, double d, double e) {
double r2154702 = e;
double r2154703 = d;
double r2154704 = r2154702 + r2154703;
double r2154705 = c;
double r2154706 = r2154704 + r2154705;
double r2154707 = b;
double r2154708 = r2154706 + r2154707;
double r2154709 = a;
double r2154710 = r2154708 + r2154709;
return r2154710;
}
double f(double a, double b, double c, double d, double e) {
double r2154711 = c;
double r2154712 = exp(r2154711);
double r2154713 = d;
double r2154714 = exp(r2154713);
double r2154715 = r2154712 * r2154714;
double r2154716 = b;
double r2154717 = exp(r2154716);
double r2154718 = a;
double r2154719 = exp(r2154718);
double r2154720 = r2154717 * r2154719;
double r2154721 = e;
double r2154722 = exp(r2154721);
double r2154723 = r2154720 * r2154722;
double r2154724 = r2154715 * r2154723;
double r2154725 = log(r2154724);
return r2154725;
}




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 sum-log0.4
Applied sum-log0.3
Simplified0.2
rmApplied add-log-exp0.2
Applied add-log-exp0.2
Applied sum-log0.2
Applied add-log-exp0.2
Applied sum-log0.2
Applied add-log-exp0.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 2019128 +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))