Class KahanSummation

    • Constructor Detail

      • KahanSummation

        public KahanSummation()
    • Method Detail

      • add

        public void add​(double v)
        Adds a value.
        Parameters:
        v - the value to be added to the sum.
      • value

        public double value()
        Returns the sum computed so far.
        Returns:
        the sum computed so far.
      • reset

        public void reset()
        Resets the current value and correction to zero.