In many computer languages (such as FORTRAN or the Wolfram Language), the common residue of (mod ) is written mod(b, m) (FORTRAN) or Mod[b, m] (Wolfram Language).
The function is related to the floor function by
(1)
| |||
(2)
|
where denotes the quotient, i.e., integer division.
Since usage concerning fractional part/value and integer part/value can be confusing, the following table gives a summary of names and notations used. Here, S&O indicates Spanier and Oldham (1987).
notation | name | S&O | Graham et al. | Wolfram Language |
ceiling function | -- | ceiling, least integer | Ceiling[x] | |
congruence | -- | -- | Mod[m, n] | |
floor function | floor, greatest integer, integer part | Floor[x] | ||
fractional value | fractional part or | SawtoothWave[x] | ||
fractional part | no name | FractionalPart[x] | ||
integer part | no name | IntegerPart[x] | ||
nearest integer function | -- | -- | Round[x] | |
quotient | -- | -- | Quotient[m, n] |