This site is supported by donations to The OEIS Foundation.
Integer division
From OeisWiki
Integer division (or Euclidean division) is an operation on integers defined as
where
⌊ ·⌋ |
is the floor function. In the mapping
given by the division algorithm, the integer quotient[1]
| q ∈ ℤ |
, with
| 0 ≤ r < | n | |
Least absolute remainder
[edit]The least absolute remainder integer division (or nearest integer division) is an operation on integers defined as
where
| sgn (n) |
is the sign function. In the mapping
given by the [least absolute remainder] division algorithm, the nearest integer quotient
| q ∈ ℤ |
, with
| − ⌊ ≤ r < | n | /2⌋| n | − ⌊ | n | /2⌋ |
as the least absolute remainder.
Examples
[edit]The allowed least absolute remainders
|
The allowed least absolute remainders
|
See also
[edit]Notes
[edit]- ↑ Weisstein, Eric W., Quotient, from MathWorld—A Wolfram Web Resource.
- ↑ Weisstein, Eric W., Remainder, from MathWorld—A Wolfram Web Resource.