ph-math/src/main/java/com/helger/numbercruncher/mathutils/KahanSummation.java
public void add (final float addend)
  {
    // Correct the addend value and add it to the running sum.
    m_fCorrectedAddend = addend + m_fCorrection;
    final float tempSum = m_fSum + m_fCorrectedAddend;

    // Compute the next correction and set the running sum.
    // The parentheses are necessary to compute the high-order
    // bits of the addend.
    m_fCorrection = m_fCorrectedAddend - (tempSum - m_fSum);
    m_fSum = tempSum;
  }
public void add (final float addend)
  {
    // Correct the addend value and add it to the running sum.
    m_fCorrectedAddend = addend + m_fCorrection;
    final float tempSum = m_fSum + m_fCorrectedAddend;

    // Compute the next correction and set the running sum.
    // The parentheses are necessary to compute the high-order
    // bits of the addend.
    m_fCorrection = m_fCorrectedAddend - (tempSum - m_fSum);
    m_fSum = tempSum;
  }
public void add ( final float addend ) { // Correct the addend value and add it to the running sum. m_fCorrectedAddend = addend + m_fCorrection ; final float tempSum = m_fSum + m_fCorrectedAddend ; // Compute the next correction and set the running sum. // The parentheses are necessary to compute the high-order // bits of the addend. m_fCorrection = m_fCorrectedAddend - ( tempSum - m_fSum ) ; m_fSum = tempSum ; }
Add the value of an addend to the running sum.

@param addend
the value
Add the value of an addend to the running sum .