\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{d} \cdot \left(e^{e} \cdot e^{c}\right)\right) + \left(b + a\right)double f(double a, double b, double c, double d, double e) {
double r58130 = e;
double r58131 = d;
double r58132 = r58130 + r58131;
double r58133 = c;
double r58134 = r58132 + r58133;
double r58135 = b;
double r58136 = r58134 + r58135;
double r58137 = a;
double r58138 = r58136 + r58137;
return r58138;
}
double f(double a, double b, double c, double d, double e) {
double r58139 = d;
double r58140 = exp(r58139);
double r58141 = e;
double r58142 = exp(r58141);
double r58143 = c;
double r58144 = exp(r58143);
double r58145 = r58142 * r58144;
double r58146 = r58140 * r58145;
double r58147 = log(r58146);
double r58148 = b;
double r58149 = a;
double r58150 = r58148 + r58149;
double r58151 = r58147 + r58150;
return r58151;
}




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.2 |
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 sum-log0.2
Simplified0.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 rem-exp-log0.2
Final simplification0.2
herbie shell --seed 2019326
(FPCore (a b c d e)
:name "Expression 1, p15"
:precision binary64
:pre (<= 1 a 2 b 4 c 8 d 16 e 32)
:herbie-target
(+ (+ d (+ c (+ a b))) e)
(+ (+ (+ (+ e d) c) b) a))