quotRem package:base

Simultaneous quot and rem. WARNING: This function is partial (because it throws when 0 is passed as the divisor) for all the integer types in base.
Used to implement quotRem for the Integral typeclass. This gives a tuple equivalent to
(quot x y, mod x y)

Example

>>> quotRemInt 10 2
(5,0)
>>> quotRem 10 2
(5,0)
Rounds towards zero.
Takes high word of dividend, then low word of dividend, then divisor. Requires that high word < divisor.
Used to implement quotRem for the Integral typeclass. This gives a tuple equivalent to
(quot x y, mod x y)

Example

>>> quotRemInteger 10 2
(5,0)
>>> quotRem 10 2
(5,0)
Deprecated: Use integerQuotRem# instead