\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{d} \cdot \left(e^{e} \cdot e^{c}\right)\right) + \left(b + a\right)double f(double a, double b, double c, double d, double e) {
double r85194 = e;
double r85195 = d;
double r85196 = r85194 + r85195;
double r85197 = c;
double r85198 = r85196 + r85197;
double r85199 = b;
double r85200 = r85198 + r85199;
double r85201 = a;
double r85202 = r85200 + r85201;
return r85202;
}
double f(double a, double b, double c, double d, double e) {
double r85203 = d;
double r85204 = exp(r85203);
double r85205 = e;
double r85206 = exp(r85205);
double r85207 = c;
double r85208 = exp(r85207);
double r85209 = r85206 * r85208;
double r85210 = r85204 * r85209;
double r85211 = log(r85210);
double r85212 = b;
double r85213 = a;
double r85214 = r85212 + r85213;
double r85215 = r85211 + r85214;
return r85215;
}




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.2 |
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.2
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 rem-exp-log0.2
Final simplification0.2
herbie shell --seed 2019326
(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))