\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(e^{c} \cdot e^{d}\right) \cdot \left(e^{a} \cdot \left(e^{e} \cdot e^{b}\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r4748972 = e;
double r4748973 = d;
double r4748974 = r4748972 + r4748973;
double r4748975 = c;
double r4748976 = r4748974 + r4748975;
double r4748977 = b;
double r4748978 = r4748976 + r4748977;
double r4748979 = a;
double r4748980 = r4748978 + r4748979;
return r4748980;
}
double f(double a, double b, double c, double d, double e) {
double r4748981 = c;
double r4748982 = exp(r4748981);
double r4748983 = d;
double r4748984 = exp(r4748983);
double r4748985 = r4748982 * r4748984;
double r4748986 = a;
double r4748987 = exp(r4748986);
double r4748988 = e;
double r4748989 = exp(r4748988);
double r4748990 = b;
double r4748991 = exp(r4748990);
double r4748992 = r4748989 * r4748991;
double r4748993 = r4748987 * r4748992;
double r4748994 = r4748985 * r4748993;
double r4748995 = log(r4748994);
return r4748995;
}




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 sum-log0.4
Simplified0.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.2
Applied sum-log0.0
Applied rem-exp-log0.0
Final simplification0.0
herbie shell --seed 2019129 +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))