\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{e} \cdot e^{d}\right) \cdot \left(e^{b} \cdot \left(e^{c} \cdot e^{a}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r22052083 = e;
double r22052084 = d;
double r22052085 = r22052083 + r22052084;
double r22052086 = c;
double r22052087 = r22052085 + r22052086;
double r22052088 = b;
double r22052089 = r22052087 + r22052088;
double r22052090 = a;
double r22052091 = r22052089 + r22052090;
return r22052091;
}
double f(double a, double b, double c, double d, double e) {
double r22052092 = e;
double r22052093 = exp(r22052092);
double r22052094 = d;
double r22052095 = exp(r22052094);
double r22052096 = r22052093 * r22052095;
double r22052097 = b;
double r22052098 = exp(r22052097);
double r22052099 = c;
double r22052100 = exp(r22052099);
double r22052101 = a;
double r22052102 = exp(r22052101);
double r22052103 = r22052100 * r22052102;
double r22052104 = r22052098 * r22052103;
double r22052105 = r22052096 * r22052104;
double r22052106 = log(r22052105);
return r22052106;
}




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