# Is there a name for these binary operations?

In computer programming, I often encounter the need to give the binary operations:

• The greatest multiple of $y$ that is not greater than $x$
• $41 \circ_1 6 = 36$
• $3.2 \circ_1 0.5 = 3$
• The least multiple of $y$ that is not less than $x$
• $41 \circ_2 7 = 42$
• $3.2 \circ_2 0.5 = 3.5$

where $x$ and $y$ belong to the same class (such integer or float). Mathematically, it can be considered that they are both integers or both real numbers. They are somewhat reminiscent of floor and ceiling functions.

Is there such notion (and perhaps names and/or notations) like these binary operations?

If by "multiple" you mean integer multiple, then mathematically the first one is $$\left\lfloor \frac{x}{y} \right\rfloor y$$ and the second one is $$\left\lceil \frac{x}{y} \right\rceil y$$

Microsoft Excel at least has a name for the functions you are looking for. They are simply called FLOOR and CEILING. To acheive the results you want in Excel, you simply type:

=FLOOR(x,y)


and

=CEILING(x,y)


It would seem reasonable that if Excel can do it then computer programming languages should be able to do it, but I can't find specific information.

• So there is no simple binary operation for that?
– sawa
Aug 15 '14 at 7:34
• I believe you mean $\left\lfloor \frac{x}{y} \right\rfloor y$ and $\left\lceil \frac{x}{y} \right\rceil y$. Aug 15 '14 at 11:10
• Oops. Yes. thank you Rory. Aug 15 '14 at 17:07