double f(double a, double b, double c, double d, double e) {
double r16817717 = e;
double r16817718 = d;
double r16817719 = r16817717 + r16817718;
double r16817720 = c;
double r16817721 = r16817719 + r16817720;
double r16817722 = b;
double r16817723 = r16817721 + r16817722;
double r16817724 = a;
double r16817725 = r16817723 + r16817724;
return r16817725;
}
double f(double a, double b, double c, double d, double e) {
double r16817726 = c;
double r16817727 = a;
double r16817728 = r16817726 + r16817727;
double r16817729 = b;
double r16817730 = r16817728 + r16817729;
double r16817731 = e;
double r16817732 = d;
double r16817733 = r16817731 + r16817732;
double r16817734 = r16817730 + r16817733;
double r16817735 = exp(r16817734);
double r16817736 = log(r16817735);
return r16817736;
}
\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(e^{\left(\left(c + a\right) + b\right) + \left(e + d\right)}\right)



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d




Bits error versus e
| Original | 0.4 |
|---|---|
| Target | 0.2 |
| Herbie | 0.3 |
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
Final simplification0.3
herbie shell --seed 2019102
(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))