/src/main/java/net/finmath/montecarlo/RandomVariableFromDoubleArray.java
final double average = getAverage( probabilities) ;final double average = getAverage( ) ;
final double average = getAverage ( ) ;
if(isDeterministic() || size() == 1) { return 0.0; } if(size() == 0) { return Double.NaN; } <extra_id_0> double sum = 0.0; double errorOfSum = 0.0; for(int i=0; i<realizations.length; i++) { final double value = (realizations[i] - average)*(realizations[i] - average) - errorOfSum; final double newSum = sum + value; errorOfSum = (newSum - sum) - value;