Magnum/Math/Algorithms/KahanSum.h file

Function Magnum::Math::Algorithms::kahanSum()

Namespaces

namespace Magnum
Root namespace.
namespace Magnum::Math
Math library.
namespace Magnum::Math::Algorithms
Algorithms.

Functions

template<class Iterator, class T = typename std::decay<decltype(*std::declval<Iterator>())>::type>
auto kahanSum(Iterator begin, Iterator end, T sum = T(0), T* compensation = nullptr) -> T
Kahan summation algorithm.