\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{d} \cdot e^{c}\right) \cdot \left(\left(e^{a} \cdot e^{b}\right) \cdot e^{e}\right)\right)double f(double a, double b, double c, double d, double e) {
double r65688 = e;
double r65689 = d;
double r65690 = r65688 + r65689;
double r65691 = c;
double r65692 = r65690 + r65691;
double r65693 = b;
double r65694 = r65692 + r65693;
double r65695 = a;
double r65696 = r65694 + r65695;
return r65696;
}
double f(double a, double b, double c, double d, double e) {
double r65697 = d;
double r65698 = exp(r65697);
double r65699 = c;
double r65700 = exp(r65699);
double r65701 = r65698 * r65700;
double r65702 = a;
double r65703 = exp(r65702);
double r65704 = b;
double r65705 = exp(r65704);
double r65706 = r65703 * r65705;
double r65707 = e;
double r65708 = exp(r65707);
double r65709 = r65706 * r65708;
double r65710 = r65701 * r65709;
double r65711 = log(r65710);
return r65711;
}




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