\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{d}\right) + \left(\left(b + a\right) + \left(e + c\right)\right)double f(double a, double b, double c, double d, double e) {
double r69581 = e;
double r69582 = d;
double r69583 = r69581 + r69582;
double r69584 = c;
double r69585 = r69583 + r69584;
double r69586 = b;
double r69587 = r69585 + r69586;
double r69588 = a;
double r69589 = r69587 + r69588;
return r69589;
}
double f(double a, double b, double c, double d, double e) {
double r69590 = d;
double r69591 = exp(r69590);
double r69592 = log(r69591);
double r69593 = b;
double r69594 = a;
double r69595 = r69593 + r69594;
double r69596 = e;
double r69597 = c;
double r69598 = r69596 + r69597;
double r69599 = r69595 + r69598;
double r69600 = r69592 + r69599;
return r69600;
}




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.3 |
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.3
Simplified0.3
rmApplied exp-sum0.3
Applied log-prod0.3
Applied associate-+l+0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019235
(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))