\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{e} \cdot \left(\left(e^{a} \cdot e^{b}\right) \cdot \left(e^{d} \cdot e^{c}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r4715416 = e;
double r4715417 = d;
double r4715418 = r4715416 + r4715417;
double r4715419 = c;
double r4715420 = r4715418 + r4715419;
double r4715421 = b;
double r4715422 = r4715420 + r4715421;
double r4715423 = a;
double r4715424 = r4715422 + r4715423;
return r4715424;
}
double f(double a, double b, double c, double d, double e) {
double r4715425 = e;
double r4715426 = exp(r4715425);
double r4715427 = a;
double r4715428 = exp(r4715427);
double r4715429 = b;
double r4715430 = exp(r4715429);
double r4715431 = r4715428 * r4715430;
double r4715432 = d;
double r4715433 = exp(r4715432);
double r4715434 = c;
double r4715435 = exp(r4715434);
double r4715436 = r4715433 * r4715435;
double r4715437 = r4715431 * r4715436;
double r4715438 = r4715426 * r4715437;
double r4715439 = log(r4715438);
return r4715439;
}




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 sum-log0.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.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 2019170 +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))