\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{e} \cdot \left(\left(e^{a} \cdot e^{b}\right) \cdot \left(e^{d} \cdot e^{c}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r1995667 = e;
double r1995668 = d;
double r1995669 = r1995667 + r1995668;
double r1995670 = c;
double r1995671 = r1995669 + r1995670;
double r1995672 = b;
double r1995673 = r1995671 + r1995672;
double r1995674 = a;
double r1995675 = r1995673 + r1995674;
return r1995675;
}
double f(double a, double b, double c, double d, double e) {
double r1995676 = e;
double r1995677 = exp(r1995676);
double r1995678 = a;
double r1995679 = exp(r1995678);
double r1995680 = b;
double r1995681 = exp(r1995680);
double r1995682 = r1995679 * r1995681;
double r1995683 = d;
double r1995684 = exp(r1995683);
double r1995685 = c;
double r1995686 = exp(r1995685);
double r1995687 = r1995684 * r1995686;
double r1995688 = r1995682 * r1995687;
double r1995689 = r1995677 * r1995688;
double r1995690 = log(r1995689);
return r1995690;
}




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.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 add-log-exp0.4
Applied sum-log0.3
Applied sum-log0.2
Applied sum-log0.0
Simplified0.2
rmApplied add-log-exp0.2
Applied add-log-exp0.2
Applied sum-log0.2
Applied add-log-exp0.2
Applied add-log-exp0.2
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 2019153
(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))