31template <concepts::kahan_addable T>
107 [[nodiscard]]
auto sum() const noexcept -> const T& {
return sum_; }
Class to add numbers using Kahan summation kahan1965.
kahan_adder(const T &zero)
Construct with zero number.
auto operator+=(const T &value) -> kahan_adder &
Add a number.
auto add(const T &value) -> kahan_adder &
Add a number.
auto operator-=(const T &value) -> kahan_adder &
Subtract a number.
auto sum() const noexcept -> const T &
Get sum.
kahan_adder()
Constructor.
auto sub(const T &value) -> kahan_adder &
Subtract a number.
Definition of kahan_addable concept.