Compensated summation (source code)

= Compensated summation

<Compensated summation> retains a correction for low-order information lost to <roundoff error> in successive <floating-point arithmetic> additions. <Kahan summation> is a common implementation; it can substantially reduce accumulated error when many terms are added.