quotRem package:ihaskell

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. Warning: this can fail with an unchecked exception.
Warning: this can fail with an unchecked exception.
Warning: this can fail with an unchecked exception.
Warning: this can fail with an unchecked exception.
Warning: this can fail with an unchecked exception.
Warning: this can fail with an unchecked exception.
Takes high word of dividend, then low word of dividend, then divisor. Requires that high word < divisor. Warning: this can fail with an unchecked exception.
Warning: this can fail with an unchecked exception.
Warning: this can fail with an unchecked exception.
Simultaneous integerQuot and integerRem. Divisor must be non-zero otherwise the GHC runtime will terminate with a division-by-zero fault.
Simultaneous integerQuot and integerRem. Divisor must be non-zero otherwise the GHC runtime will terminate with a division-by-zero fault.
Return division quotient and remainder
Return division quotient and remainder Division by zero is handled by BigNat