double f(double a, double b, double c, double d, double e) {
double r8682682 = e;
double r8682683 = d;
double r8682684 = r8682682 + r8682683;
double r8682685 = c;
double r8682686 = r8682684 + r8682685;
double r8682687 = b;
double r8682688 = r8682686 + r8682687;
double r8682689 = a;
double r8682690 = r8682688 + r8682689;
return r8682690;
}
double f(double a, double b, double c, double d, double e) {
double r8682691 = e;
double r8682692 = exp(r8682691);
double r8682693 = a;
double r8682694 = exp(r8682693);
double r8682695 = b;
double r8682696 = exp(r8682695);
double r8682697 = d;
double r8682698 = exp(r8682697);
double r8682699 = c;
double r8682700 = exp(r8682699);
double r8682701 = r8682698 * r8682700;
double r8682702 = r8682696 * r8682701;
double r8682703 = r8682694 * r8682702;
double r8682704 = r8682692 * r8682703;
double r8682705 = log(r8682704);
return r8682705;
}
\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{e} \cdot \left(e^{a} \cdot \left(e^{b} \cdot \left(e^{d} \cdot e^{c}\right)\right)\right)\right)



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d




Bits error versus e
| 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 add-log-exp0.4
Applied sum-log0.4
Applied sum-log0.3
Applied sum-log0.2
Simplified0.3
Taylor expanded around -inf 0.3
rmApplied add-log-exp0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied add-log-exp0.3
Applied sum-log0.2
Applied add-log-exp0.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 2019102 +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))