\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{c} \cdot \left(\left(e^{e} \cdot e^{d}\right) \cdot \left(e^{b} \cdot e^{a}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r3913287 = e;
double r3913288 = d;
double r3913289 = r3913287 + r3913288;
double r3913290 = c;
double r3913291 = r3913289 + r3913290;
double r3913292 = b;
double r3913293 = r3913291 + r3913292;
double r3913294 = a;
double r3913295 = r3913293 + r3913294;
return r3913295;
}
double f(double a, double b, double c, double d, double e) {
double r3913296 = c;
double r3913297 = exp(r3913296);
double r3913298 = e;
double r3913299 = exp(r3913298);
double r3913300 = d;
double r3913301 = exp(r3913300);
double r3913302 = r3913299 * r3913301;
double r3913303 = b;
double r3913304 = exp(r3913303);
double r3913305 = a;
double r3913306 = exp(r3913305);
double r3913307 = r3913304 * r3913306;
double r3913308 = r3913302 * r3913307;
double r3913309 = r3913297 * r3913308;
double r3913310 = log(r3913309);
return r3913310;
}




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 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
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 2019172 +o rules:numerics
(FPCore (a b c d e)
:name "Expression 1, p15"
:pre (<= 1.0 a 2.0 b 4.0 c 8.0 d 16.0 e 32.0)
:herbie-target
(+ (+ d (+ c (+ a b))) e)
(+ (+ (+ (+ e d) c) b) a))