\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{c} \cdot e^{e}\right) \cdot \left(\left(e^{d} \cdot e^{b}\right) \cdot e^{a}\right)\right)double f(double a, double b, double c, double d, double e) {
double r12923308 = e;
double r12923309 = d;
double r12923310 = r12923308 + r12923309;
double r12923311 = c;
double r12923312 = r12923310 + r12923311;
double r12923313 = b;
double r12923314 = r12923312 + r12923313;
double r12923315 = a;
double r12923316 = r12923314 + r12923315;
return r12923316;
}
double f(double a, double b, double c, double d, double e) {
double r12923317 = c;
double r12923318 = exp(r12923317);
double r12923319 = e;
double r12923320 = exp(r12923319);
double r12923321 = r12923318 * r12923320;
double r12923322 = d;
double r12923323 = exp(r12923322);
double r12923324 = b;
double r12923325 = exp(r12923324);
double r12923326 = r12923323 * r12923325;
double r12923327 = a;
double r12923328 = exp(r12923327);
double r12923329 = r12923326 * r12923328;
double r12923330 = r12923321 * r12923329;
double r12923331 = log(r12923330);
return r12923331;
}




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