public class KahanSummation extends Object
Constructor and Description |
---|
KahanSummation() |
Modifier and Type | Method and Description |
---|---|
void |
add(double a)
Add the value to the summation
|
double |
getMean()
Gets the mean value of the summands.
|
double |
getSum()
The current value of the summation.
|
int |
getSummandCount()
Gets the number of summands that were added to the summation.
|
public void add(double a)
a
- a valid floating-point numberpublic double getSum()
public double getMean()
public int getSummandCount()
Copyright © 2021. All rights reserved.