\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{a} \cdot e^{e}\right) \cdot \left(\left(e^{d} \cdot e^{c}\right) \cdot e^{b}\right)\right)double f(double a, double b, double c, double d, double e) {
double r5058104 = e;
double r5058105 = d;
double r5058106 = r5058104 + r5058105;
double r5058107 = c;
double r5058108 = r5058106 + r5058107;
double r5058109 = b;
double r5058110 = r5058108 + r5058109;
double r5058111 = a;
double r5058112 = r5058110 + r5058111;
return r5058112;
}
double f(double a, double b, double c, double d, double e) {
double r5058113 = a;
double r5058114 = exp(r5058113);
double r5058115 = e;
double r5058116 = exp(r5058115);
double r5058117 = r5058114 * r5058116;
double r5058118 = d;
double r5058119 = exp(r5058118);
double r5058120 = c;
double r5058121 = exp(r5058120);
double r5058122 = r5058119 * r5058121;
double r5058123 = b;
double r5058124 = exp(r5058123);
double r5058125 = r5058122 * r5058124;
double r5058126 = r5058117 * r5058125;
double r5058127 = log(r5058126);
return r5058127;
}




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