\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{e} \cdot e^{d}\right) \cdot \left(e^{a} \cdot \left(e^{c} \cdot e^{b}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r4138682 = e;
double r4138683 = d;
double r4138684 = r4138682 + r4138683;
double r4138685 = c;
double r4138686 = r4138684 + r4138685;
double r4138687 = b;
double r4138688 = r4138686 + r4138687;
double r4138689 = a;
double r4138690 = r4138688 + r4138689;
return r4138690;
}
double f(double a, double b, double c, double d, double e) {
double r4138691 = e;
double r4138692 = exp(r4138691);
double r4138693 = d;
double r4138694 = exp(r4138693);
double r4138695 = r4138692 * r4138694;
double r4138696 = a;
double r4138697 = exp(r4138696);
double r4138698 = c;
double r4138699 = exp(r4138698);
double r4138700 = b;
double r4138701 = exp(r4138700);
double r4138702 = r4138699 * r4138701;
double r4138703 = r4138697 * r4138702;
double r4138704 = r4138695 * r4138703;
double r4138705 = log(r4138704);
return r4138705;
}




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