Skip to content

ludus::foundation::math::CompensatedSum

Ludus Wiki · API overview · Browse API

Class

Neumaier compensated accumulator; default state is an empty sum (0.0).

Declared in modules/foundation/math/include/ludus/foundation/math/summation.hpp

#include <ludus/foundation/math/summation.hpp>
class ludus::foundation::math::CompensatedSum final

Methods

Add

void ludus::foundation::math::CompensatedSum::Add(float64 value) noexcept
Add one term to the running sum.

Related types: float64

Declared in modules/foundation/math/include/ludus/foundation/math/summation.hpp

GetResult

float64 ludus::foundation::math::CompensatedSum::GetResult() const noexcept
Total plus the running compensation; the compensation is ignored when it is zero or non-finite.

Related types: float64

Declared in modules/foundation/math/include/ludus/foundation/math/summation.hpp