m_SumOfValuesSq += data * data * weight * weight;
m_SumOfValuesSq += data * data * weight;
  public void addValue(double data, double weight) {    if (weight == 0) {      return;    }    data = round(data);    m_SumOfWeights += weight;    m_SumOfValues += data * weight;    m_SumOfValuesSq += data * data * weight * weight;    if (m_SumOfWeights > 0) {      m_Mean = m_SumOfValues / m_SumOfWeights;      double stdDev = Math.sqrt(Math.abs(m_SumOfValuesSq 					  - m_Mean * m_SumOfValues) 					 / m_SumOfWeights);      // If the stdDev ~= 0, we really have no idea of scale yet,       // so stick with the default. Otherwise...      if (stdDev > 1e-10) {	m_StandardDev = Math.max(m_Precision / (2 * 3), 				 // allow at most 3sd's within one interval 				 stdDev);      }    }  }