\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 r3786614 = e;
double r3786615 = d;
double r3786616 = r3786614 + r3786615;
double r3786617 = c;
double r3786618 = r3786616 + r3786617;
double r3786619 = b;
double r3786620 = r3786618 + r3786619;
double r3786621 = a;
double r3786622 = r3786620 + r3786621;
return r3786622;
}
double f(double a, double b, double c, double d, double e) {
double r3786623 = a;
double r3786624 = exp(r3786623);
double r3786625 = e;
double r3786626 = exp(r3786625);
double r3786627 = r3786624 * r3786626;
double r3786628 = d;
double r3786629 = exp(r3786628);
double r3786630 = c;
double r3786631 = exp(r3786630);
double r3786632 = r3786629 * r3786631;
double r3786633 = b;
double r3786634 = exp(r3786633);
double r3786635 = r3786632 * r3786634;
double r3786636 = r3786627 * r3786635;
double r3786637 = log(r3786636);
return r3786637;
}




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 sum-log0.4
Applied sum-log0.3
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 2019138 +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))