There is a brief summary of some of the many proposed ways of accurate
summation here:
http://hpcrd.lbl.gov/SCG/ocean/NRS/ECMWF/img11.htm
There is a long history of this problem, and though you may think that this
should yield to off-the-top-of-the-head analysis and is trivial, you might
be surprised by the different results by (for example)
Donald Knuth, William Kahan, David Bailey and others.
RJF