I would like to ask if there is a mathematical term for "the largest integer multiple of $n$ that is less than or equal to $a$". In software engineering, this is commonly implemented as $(a / n)\cdot n$ or $a − (a \% n)$ where both $a$ and $n$ are integers. For example, if $n=4$ and $a=10$, the result is $8$ because $4$ goes into $10$ two times and two times $4$ is $8$.
Asked
Active
Viewed 130 times
1
-
1Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to. – José Carlos Santos Jul 07 '19 at 09:36
-
@JoséCarlosSantos Thank you! – Rudolf Adamkovic Jul 07 '19 at 09:57
1 Answers
4
This is related to the floor of $\frac{a}{n}$, denoted $\lfloor\frac{a}{n}\rfloor$, the desired multiple is $\lfloor\frac{a}{n}\rfloor n$. In general, $\lfloor x\rfloor$ is defined as the largest integer less than or equal to $x$. The difference $a-\lfloor\frac{a}{n}\rfloor n$ is the remainder from dividing $a$ by $n$, and $\lfloor\frac{a}{n}\rfloor$ is the quotient from division with remainder, they are implemented by MOD and DIV functions in many computer algebra systems. But, I am afraid, there is no special name for $\lfloor\frac{a}{n}\rfloor n$ itself.
Conifold
- 11,756