Class MathUtils.KahanSummator

java.lang.Object
com.esri.core.geometry.MathUtils.KahanSummator
Enclosing class:
MathUtils

static final class MathUtils.KahanSummator extends Object
The implementation of the Kahan summation algorithm. Use to get better precision when adding a lot of values.
  • Field Details

    • sum

      private double sum
    • compensation

      private double compensation
    • startValue

      private double startValue
  • Constructor Details

    • KahanSummator

      KahanSummator(double startValue_)
      initialize to the given start value. \param startValue_ The value to be added to the accumulated sum.
  • Method Details