quotRem -package:base
hedgehog Hedgehog.Internal.Prelude,
base-compat Prelude.Compat,
protolude Protolude Protolude.Base,
relude Relude.Numeric,
Cabal-syntax Distribution.Compat.Prelude,
ihaskell IHaskellPrelude,
ghc-lib-parser GHC.Prelude.Basic,
dimensional Numeric.Units.Dimensional.Prelude,
rebase Rebase.Prelude,
xmonad-contrib XMonad.Config.Prime,
copilot-language Copilot.Language.Prelude,
LambdaHack Game.LambdaHack.Core.Prelude,
cabal-install-solver Distribution.Solver.Compat.Prelude,
faktory Faktory.Prelude,
hledger-web Hledger.Web.Import 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.
Division with remainder.
\x y -> y == 0 || let (q, r) = x `quotRem` y in x == q * y + r
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.
The quotient and remainder of a type-level integer and a natural
number. For a negative dividend, the remainder part is negative such
that x = q*y + r @since 0.1.4
Takes high word of dividend, then low word of dividend, then divisor.
Requires that high word < divisor.
Simultaneous
quotInteger and
remInteger.
Divisor must be non-zero otherwise the GHC runtime will terminate with
a division-by-zero fault.
Note: Result of div/0 undefined
2-by-1 large division
Requires: b0 /= 0 a1 >= b0 (not required, but if not q1=0)