\left(\left(\left(e + d\right) + c\right) + b\right) + a
e + \mathsf{fma}\left(\sqrt{d}, \sqrt{d}, c + \left(b + a\right)\right)double f(double a, double b, double c, double d, double e) {
double r76964 = e;
double r76965 = d;
double r76966 = r76964 + r76965;
double r76967 = c;
double r76968 = r76966 + r76967;
double r76969 = b;
double r76970 = r76968 + r76969;
double r76971 = a;
double r76972 = r76970 + r76971;
return r76972;
}
double f(double a, double b, double c, double d, double e) {
double r76973 = e;
double r76974 = d;
double r76975 = sqrt(r76974);
double r76976 = c;
double r76977 = b;
double r76978 = a;
double r76979 = r76977 + r76978;
double r76980 = r76976 + r76979;
double r76981 = fma(r76975, r76975, r76980);
double r76982 = r76973 + r76981;
return r76982;
}




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.2 |
Initial program 0.4
rmApplied associate-+l+0.3
rmApplied associate-+l+0.3
rmApplied associate-+l+0.2
rmApplied add-sqr-sqrt0.3
Applied fma-def0.2
Final simplification0.2
herbie shell --seed 2019323 +o rules:numerics
(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))