47 jassert (juce_isfinite (v));
53 if (v > maximum) maximum = v;
54 if (v < minimum) minimum = v;
68 return count > 0 ? sum / (FloatType) count
77 return count > 0 ? (sumSquares - sum * sum / (FloatType) count) / (FloatType) count
115 KahanSum() =
default;
118 void JUCE_NO_ASSOCIATIVE_MATH_OPTIMISATIONS operator+= (FloatType value)
noexcept
120 FloatType correctedValue = value - error;
121 FloatType newSum = sum + correctedValue;
122 error = (newSum - sum) - correctedValue;
126 FloatType sum{}, error{};
131 KahanSum sum, sumSquares;
132 FloatType minimum { std::numeric_limits<FloatType>::infinity() },
133 maximum { -std::numeric_limits<FloatType>::infinity() };