What is the name for the portion of a number that wholly divides?

104 Views Asked by At

What is the name for the operation that gives the portion of a number that wholly divides. kind of the the opposite of remainder/modulo e.g.

f(10, 3) = 9
f(9, 3) = 9
f(8, 3) = 6
f(7, 3) = 6
f(6, 3) = 6
f(5, 3) = 3

what should i name f?

(f(dividend, divisor) would be dividend - remainder or divisor * quotient)

2

There are 2 best solutions below

0
On

Not aware of any special name for this, but considering you are flooring to the nearest multiple of $n$, nfloor might be a reasonable name.

0
On

The Wolfram Language (used by Mathematica and WolframAlpha) treats this as a generalization of the Floor function:

  • Floor[x] is the greatest integer not greater than x.
  • Floor[x,a] is the greatest multiple of a not greater than x.

Likewise, the language also offers Ceiling[x,a] as a generalization of Ceiling[x].