Package it.unimi.dsi.util
Class KahanSummation
- java.lang.Object
-
- it.unimi.dsi.util.KahanSummation
-
public class KahanSummation extends java.lang.ObjectKahan's summation algorithm encapsulated in an object.
-
-
Constructor Summary
Constructors Constructor Description KahanSummation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(double v)Adds a value.voidreset()Resets the current value and correction to zero.doublevalue()Returns the sum computed so far.
-