12#include <spdlog/fmt/bundled/ostream.h>
16#include <range/v3/range/concepts.hpp>
17#include <range/v3/range/traits.hpp>
24struct fmt::formatter<
MathLib::KahanSum> : fmt::ostream_formatter
38 for (
auto const v : range)
47 return result += increment;
53 return result += -increment;
58 return *
this += -increment;
75 auto const precision = os.precision();
76 return os << std::setprecision(
77 std::numeric_limits<double>::max_digits10)
79 << std::setprecision(precision);
constexpr KahanSum & operator-=(double const increment)
constexpr double operator()() const
constexpr KahanSum(double const value=0)
friend std::ostream & operator<<(std::ostream &os, KahanSum const &x)
constexpr KahanSum operator-(double const increment) const
constexpr KahanSum operator+(double const increment) const
constexpr double value() const
constexpr KahanSum & operator+=(double const increment)
constexpr KahanSum(ranges::range auto const &range)