Skip to content

c8_integer_divide_modulus

Dave Hudson edited this page May 3, 2017 · 3 revisions

c8::integer::divide_modulus

auto divide_modulus(const integer &v) const -> std::pair<integer, integer>;

Divides the value of this object v (right hand side of the operator). The result is a pair that represents the quotient, and the remainder.

Return Value

A std::pair that represents the quotient and the remainder. first represents the quotient, while second represents the remainder.

Exceptions

  • std::bad_alloc in the event of a memory allocation failure.
  • c8::divide_by_zero if the divisor, v is zero.

See Also

Clone this wiki locally