I found a discussion of this exact problem in Higham, Accuracy and stability of numerical algorithms, Section 1.9.
The author suggests an alternative algorithm and claims that it is numerically stable (in the mixed backward-forward sense); proofs for the precise accuracy bounds of the formulas are left as exercises.