#pragma once
#include<ostream>
#include<climits>
class approx_nat {
unsigned m_value = 0;
static const unsigned m_limit = UINT_MAX >> 2;
public:
approx_nat() = default;
explicit approx_nat(unsigned val);
bool is_huge() const { return m_value == UINT_MAX; }
unsigned get_value() const { return m_value; }
approx_nat & operator=(unsigned w);
approx_nat & operator+=(unsigned w);
approx_nat & operator+=(approx_nat const & w) { return operator+=(w.m_value); }
approx_nat & operator*=(unsigned w);
approx_nat & operator*=(approx_nat const & w) { return operator*=(w.m_value); }
bool operator<(unsigned w) const { return !is_huge() && m_value < w; }
bool operator<(approx_nat const & w) const { return !is_huge() && !w.is_huge() && m_value < w.m_value; }
};
std::ostream & operator<<(std::ostream & target, approx_nat const & w);