final case class KahanSum(sum: Double = 0, c: Double = 0) extends Product with Serializable

Aggregator state.

sum

the accumulator

c

a running compensation for lost low-order bits

Note

cannot use generics for double vs float due to perf: https://stackoverflow.com/questions/4753629/how-do-i-make-a-class-generic-for-all-numeric-types

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KahanSum
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KahanSum(sum: Double = 0, c: Double = 0)

    sum

    the accumulator

    c

    a running compensation for lost low-order bits

Value Members

  1. def +(other: KahanSum): KahanSum
  2. def +(x: Double): KahanSum
  3. val c: Double
  4. val sum: Double
  5. def toDouble: Double