\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{c} \cdot e^{d}\right) \cdot \left(e^{a} \cdot \left(e^{e} \cdot e^{b}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r4993581 = e;
double r4993582 = d;
double r4993583 = r4993581 + r4993582;
double r4993584 = c;
double r4993585 = r4993583 + r4993584;
double r4993586 = b;
double r4993587 = r4993585 + r4993586;
double r4993588 = a;
double r4993589 = r4993587 + r4993588;
return r4993589;
}
double f(double a, double b, double c, double d, double e) {
double r4993590 = c;
double r4993591 = exp(r4993590);
double r4993592 = d;
double r4993593 = exp(r4993592);
double r4993594 = r4993591 * r4993593;
double r4993595 = a;
double r4993596 = exp(r4993595);
double r4993597 = e;
double r4993598 = exp(r4993597);
double r4993599 = b;
double r4993600 = exp(r4993599);
double r4993601 = r4993598 * r4993600;
double r4993602 = r4993596 * r4993601;
double r4993603 = r4993594 * r4993602;
double r4993604 = log(r4993603);
return r4993604;
}




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