Skip to content

c8_integer

Dave Hudson edited this page Apr 1, 2017 · 5 revisions

c8::integer

c8::integer is a class designed to represent the integers (all positive and negative whole numbers). Conceptually they behave in a somewhat similar way to int, but offer unlimited precision.

Constructors

Construct a integer number.

Destructor

  • ~integer

Destroy (and free all resources allocated to) a integer number.

Comparison Operators

Compare this integer number with another.

Arithmetic Operators

Perform arithmetic with this number.

Bitwise Operators

Perform bitwise operations on this number.

Assignment Operators

Perform assignment operations on this number.

Public Member Functions

  • auto operator -() const -> integer
  • auto divide_modulus(const integer &v) const -> std::pair<integer, integer>
  • auto gcd(const integer &v) const -> integer
  • auto to_long_long() const -> long long
  • auto is_zero() const noexcept -> bool
  • auto is_negative() const -> bool
  • auto abs() const -> natural
  • auto negate() -> integer &
  • friend auto operator <<(std::ostream &outstr, const integer &v) -> std::ostream &

TBD

Clone this wiki locally