12#include <rtl/math.hxx>
219 if (((m_fMem < 0.0 && fTotal > 0.0) || (fTotal < 0.0 && m_fMem > 0.0))
220 && rtl::math::approxEqual(
m_fMem, -fTotal))
This class provides LO with Kahan summation algorithm About this algorithm: https://en....
bool operator>=(double fSum) const
bool operator>=(const KahanSum &fSum) const
void subtract(const KahanSum &fSum)
Substracts a value to the sum using Kahan summation.
KahanSum operator+(const KahanSum &fSum) const
void operator-=(const KahanSum &fSum)
bool operator>(double fSum) const
constexpr KahanSum(double x_0)
KahanSum operator+(double fSum) const
KahanSum operator-(const KahanSum &fSum) const
bool operator<=(const KahanSum &fSum) const
bool operator>(const KahanSum &fSum) const
void add(const KahanSum &fSum)
Adds a value to the sum using Kahan summation.
constexpr KahanSum(double x_0, double err_0)
double get() const
Returns the final sum.
bool operator<(const KahanSum &fSum) const
bool operator<(double fSum) const
constexpr void operator*=(double fTimes)
In some parts of the code of interpr_.cxx this may be used for product instead of sum.
void operator+=(const KahanSum &fSum)
void add(double x_i)
Adds a value to the sum using Kahan summation.
constexpr KahanSum operator-() const
void operator-=(double fSum)
KahanSum operator*(const KahanSum &fTimes) const
constexpr KahanSum()=default
constexpr KahanSum & operator=(const KahanSum &fSum)=default
KahanSum operator-(double fSum) const
bool operator!=(const KahanSum &fSum) const
void operator+=(double fSum)
KahanSum operator/(double fDivides) const
constexpr void operator/=(double fDivides)
bool operator<=(double fSum) const
constexpr KahanSum & operator=(double fSum)
KahanSum operator*(double fTimes) const
constexpr KahanSum(const KahanSum &fSum)=default
bool operator==(const KahanSum &fSum) const
KahanSum operator/(const KahanSum &fDivides) const
static o3tl::enumarray< DebugTime, double > fTimes