\left(\left(\left(e + d\right) + c\right) + b\right) + a
\log \left(\left(\sqrt{\left(e^{d} \cdot e^{c}\right) \cdot e^{b}} \cdot \sqrt{\left(e^{d} \cdot e^{c}\right) \cdot e^{b}}\right) \cdot \left(e^{e} \cdot e^{a}\right)\right)double f(double a, double b, double c, double d, double e) {
double r4957001 = e;
double r4957002 = d;
double r4957003 = r4957001 + r4957002;
double r4957004 = c;
double r4957005 = r4957003 + r4957004;
double r4957006 = b;
double r4957007 = r4957005 + r4957006;
double r4957008 = a;
double r4957009 = r4957007 + r4957008;
return r4957009;
}
double f(double a, double b, double c, double d, double e) {
double r4957010 = d;
double r4957011 = exp(r4957010);
double r4957012 = c;
double r4957013 = exp(r4957012);
double r4957014 = r4957011 * r4957013;
double r4957015 = b;
double r4957016 = exp(r4957015);
double r4957017 = r4957014 * r4957016;
double r4957018 = sqrt(r4957017);
double r4957019 = r4957018 * r4957018;
double r4957020 = e;
double r4957021 = exp(r4957020);
double r4957022 = a;
double r4957023 = exp(r4957022);
double r4957024 = r4957021 * r4957023;
double r4957025 = r4957019 * r4957024;
double r4957026 = log(r4957025);
return r4957026;
}




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 add-log-exp0.4
Applied sum-log0.4
Applied sum-log0.3
Applied sum-log0.2
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
rmApplied add-sqr-sqrt0.0
Final simplification0.0
herbie shell --seed 2019152 +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))