18  template<
typename DT_>
 
   51      DT_ t = this->value + y;
 
   52      this->correction = (t - this->
value) - y;
 
Kahan Summation accumulator class template.
KahanAccumulator(DT_ val)
constructor
KahanAccumulator()
default constructor
DT_ value
the current sum value
DT_ correction
the current correction
void clear()
clears the accumulator, i.e. sets all values to zero
KahanAccumulator & operator+=(DT_ val)
updates the summed accumulator with a new summand