\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{e} \cdot \left(e^{a} \cdot \left(\left(e^{d} \cdot e^{c}\right) \cdot e^{b}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r6908522 = e;
double r6908523 = d;
double r6908524 = r6908522 + r6908523;
double r6908525 = c;
double r6908526 = r6908524 + r6908525;
double r6908527 = b;
double r6908528 = r6908526 + r6908527;
double r6908529 = a;
double r6908530 = r6908528 + r6908529;
return r6908530;
}
double f(double a, double b, double c, double d, double e) {
double r6908531 = e;
double r6908532 = exp(r6908531);
double r6908533 = a;
double r6908534 = exp(r6908533);
double r6908535 = d;
double r6908536 = exp(r6908535);
double r6908537 = c;
double r6908538 = exp(r6908537);
double r6908539 = r6908536 * r6908538;
double r6908540 = b;
double r6908541 = exp(r6908540);
double r6908542 = r6908539 * r6908541;
double r6908543 = r6908534 * r6908542;
double r6908544 = r6908532 * r6908543;
double r6908545 = log(r6908544);
return r6908545;
}




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 sum-log0.2
Applied sum-log0.2
Applied add-log-exp0.2
Applied sum-log0.0
Applied rem-exp-log0.0
Final simplification0.0
herbie shell --seed 2019174
(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))