double Fast2Sum (double a, b) {
double s = a + b;
double r = b - (s - a);
return r + s; }
See A floating-point technique for extending the available precision by T. J. Dekker.
So obvious, right?
double Fast2Sum (double a, b) {
double s = a + b;
double r = b - (s - a);
return r + s; }
0 comments:
Post a Comment