Kahan summation gives better accuracy than naive summation. For instance when summing up N positive values, the relative error of Kahan summation is bound by 2^-52 while with naive summation, the error is linear with the number of values that are summed up.
Kahan summation gives better accuracy than naive summation. For instance when summing up N positive values, the relative error of Kahan summation is bound by
2^-52while with naive summation, the error is linear with the number of values that are summed up.