\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{d} \cdot \left(e^{a} \cdot \left(e^{c} \cdot e^{e}\right)\right)\right) \cdot e^{b}\right)(FPCore (a b c d e) :precision binary64 (+ (+ (+ (+ e d) c) b) a))
(FPCore (a b c d e) :precision binary64 (log (* (* (exp d) (* (exp a) (* (exp c) (exp e)))) (exp b))))
double code(double a, double b, double c, double d, double e) {
return (((e + d) + c) + b) + a;
}
double code(double a, double b, double c, double d, double e) {
return log((exp(d) * (exp(a) * (exp(c) * exp(e)))) * exp(b));
}




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+_binary64_30800.3
Simplified0.3
rmApplied associate-+r+_binary64_30790.4
Simplified0.4
rmApplied add-log-exp_binary64_31860.4
Applied add-log-exp_binary64_31860.4
Applied add-log-exp_binary64_31860.4
Applied sum-log_binary64_32380.4
Applied add-log-exp_binary64_31860.4
Applied sum-log_binary64_32380.3
Applied add-log-exp_binary64_31860.3
Applied sum-log_binary64_32380.2
Applied sum-log_binary64_32380.0
Final simplification0.0
herbie shell --seed 2021015
(FPCore (a b c d e)
:name "Expression 1, p15"
:precision binary64
:pre (<= 1.0 a 2.0 b 4.0 c 8.0 d 16.0 e 32.0)
:herbie-target
(+ (+ d (+ c (+ a b))) e)
(+ (+ (+ (+ e d) c) b) a))