\left(\left(\left(e + d\right) + c\right) + b\right) + a
\mathsf{log1p}\left(\mathsf{expm1}\left(\left(e + \left(b + a\right)\right) + \left(c + d\right)\right)\right)double f(double a, double b, double c, double d, double e) {
double r63520 = e;
double r63521 = d;
double r63522 = r63520 + r63521;
double r63523 = c;
double r63524 = r63522 + r63523;
double r63525 = b;
double r63526 = r63524 + r63525;
double r63527 = a;
double r63528 = r63526 + r63527;
return r63528;
}
double f(double a, double b, double c, double d, double e) {
double r63529 = e;
double r63530 = b;
double r63531 = a;
double r63532 = r63530 + r63531;
double r63533 = r63529 + r63532;
double r63534 = c;
double r63535 = d;
double r63536 = r63534 + r63535;
double r63537 = r63533 + r63536;
double r63538 = expm1(r63537);
double r63539 = log1p(r63538);
return r63539;
}




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
Simplified0.3
rmApplied *-un-lft-identity0.3
Applied *-un-lft-identity0.3
Applied distribute-lft-out0.3
Simplified0.2
rmApplied log1p-expm1-u0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019194 +o rules:numerics
(FPCore (a b c d e)
:name "Expression 1, p15"
:pre (<= 1.0 a 2.0 b 4.0 c 8.0 d 16.0 e 32.0)
:herbie-target
(+ (+ d (+ c (+ a b))) e)
(+ (+ (+ (+ e d) c) b) a))