\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{c} \cdot \left(\left(e^{b} \cdot e^{a}\right) \cdot \left(e^{e} \cdot e^{d}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r1993144 = e;
double r1993145 = d;
double r1993146 = r1993144 + r1993145;
double r1993147 = c;
double r1993148 = r1993146 + r1993147;
double r1993149 = b;
double r1993150 = r1993148 + r1993149;
double r1993151 = a;
double r1993152 = r1993150 + r1993151;
return r1993152;
}
double f(double a, double b, double c, double d, double e) {
double r1993153 = c;
double r1993154 = exp(r1993153);
double r1993155 = b;
double r1993156 = exp(r1993155);
double r1993157 = a;
double r1993158 = exp(r1993157);
double r1993159 = r1993156 * r1993158;
double r1993160 = e;
double r1993161 = exp(r1993160);
double r1993162 = d;
double r1993163 = exp(r1993162);
double r1993164 = r1993161 * r1993163;
double r1993165 = r1993159 * r1993164;
double r1993166 = r1993154 * r1993165;
double r1993167 = log(r1993166);
return r1993167;
}




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 associate-+l+0.3
rmApplied add-log-exp0.3
Applied add-log-exp0.3
Applied add-log-exp0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied sum-log0.3
Applied sum-log0.1
Simplified0.3
rmApplied add-log-exp0.3
Applied 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 sum-log0.2
Applied sum-log0.0
Applied rem-exp-log0.0
Final simplification0.0
herbie shell --seed 2019151
(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))