\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 r5036741 = e;
double r5036742 = d;
double r5036743 = r5036741 + r5036742;
double r5036744 = c;
double r5036745 = r5036743 + r5036744;
double r5036746 = b;
double r5036747 = r5036745 + r5036746;
double r5036748 = a;
double r5036749 = r5036747 + r5036748;
return r5036749;
}
double f(double a, double b, double c, double d, double e) {
double r5036750 = e;
double r5036751 = exp(r5036750);
double r5036752 = a;
double r5036753 = exp(r5036752);
double r5036754 = b;
double r5036755 = exp(r5036754);
double r5036756 = r5036753 * r5036755;
double r5036757 = d;
double r5036758 = exp(r5036757);
double r5036759 = c;
double r5036760 = exp(r5036759);
double r5036761 = r5036758 * r5036760;
double r5036762 = r5036756 * r5036761;
double r5036763 = r5036751 * r5036762;
double r5036764 = log(r5036763);
return r5036764;
}




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.3
rmApplied add-log-exp0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied add-log-exp0.3
Applied add-log-exp0.3
Applied add-log-exp0.3
Applied sum-log0.3
Applied sum-log0.3
Applied sum-log0.0
Simplified0.2
rmApplied add-log-exp0.2
Applied 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 sum-log0.0
Applied rem-exp-log0.0
Final simplification0.0
herbie shell --seed 2019169 +o rules:numerics
(FPCore (a b c d e)
:name "Expression 1, p15"
: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))