Programming languages implement division and modulo with various rounding modes. Most languages use truncated division by default. More information and additional languages can be found on the Wikipedia article for modulo.
/
, %
/
, %
Z.quot
, Z.rem
, Z.quotrem
, Infix "รท" : Z_scope
/
, %
/
, %
,
big.Int.Quo
,
big.Int.Rem
,
big.Int.QuoRem
mpz_tdiv_q
, mpz_tdiv_r
, mpz_tdiv_qr
quot
,
rem
,
quotRem
(Haskell 98
and 2010)sdiv
,
srem
/
,
%
%
/
,
%
,
div_trunc
,
rem_trunc
,
div_rem
/
, %
,
wrapping_div
,
wrapping_rem
,
overflowing_div
,
overflowing_rem
,
checked_div
,
checked_rem
,
strict_div
(unstable),
strict_rem
(unstable),
saturating_div
Z.div
, Z.modulo
, Z.div_eucl
, Infix "/" : Z_scope
, Infix "mod" : Z_scope
,
N.div
, N.modulo
, N.div_eucl
, Infix "/" : N_scope
, Infix "mod" : N_scope
mpz_fdiv_q
, mpz_fdiv_r
, mpz_fdiv_qr
div
,
mod
,
divMod
(Haskell 98
and 2010)div_floor
,
rem_floor
,
div_rem_floor
div_floor
big.Int.Div
,
big.Int.Mod
,
big.Int.DivMod
div_euc
,
rem_euc
,
div_rem_euc
,
mod_u
div_euclid
,
rem_euclid
,
wrapping_div_euclid
,
wrapping_rem_euclid
,
overflowing_div_euclid
,
overflowing_rem_euclid
,
checked_div_euclid
,
checked_rem_euclid
,
strict_div_euclid
(unstable),
strict_rem_euclid
(unstable)(div Int Int)
, (mod Int Int)
mpz_cdiv_q
, mpz_cdiv_r
, mpz_cdiv_qr
div_ceil
,
rem_ceil
,
div_rem_ceil
div_ceil
div_rem_round
(not in GMP)mpz_mod