1

I want to write a formula where I can say that I have to get the remainder of a division by 4.

$y = \mathbf{remainder}(x\div4)$

Is there any math nomenclature I can use?

amWhy
  • 209,954
Fabricio
  • 421

2 Answers2

2

For integer $x$, put $\,y\,$ equal to $\;\bf x \;\text{mod}\; 4\;$. The "mod" operator will return the remainder when $x$ is divided by $4$.

See, for example: remainders: Modular Arithmetic

Note: In computer programming, this is often denoted $\;x\, \%\, 4$, where $x$ is an integer.

amWhy
  • 209,954
1

You can say $y=x\pmod 4$

See modular arithmetic.

Git Gud
  • 31,356
  • That would be less ambiguously written as $\ y = (x\ {\rm mod}\ 4),\ $ which avoids it being misinterpreted as $\ y\equiv x\pmod 4.$ – Key Ideas Jun 09 '13 at 15:37
  • @KeyIdeas Is that notation even used? I've never seen it. – Git Gud Jun 09 '13 at 15:40
  • $ x\ {\rm mod}\ m\ $ is very widely used for the remainder function. But $\ x\ ({\rm mod}\ m)\ $ often denotes the equivalence class $\ x + m,\Bbb Z,,$ not the remainder (though, in some contexts, they may denote the same object). – Key Ideas Jun 09 '13 at 15:43
  • @KeyIdeas I understand all those subtleties, I just never saw that notation before. Feel free to post your own answer and I'll delete mine. However I get the feeling that is sufficient for the OP. – Git Gud Jun 09 '13 at 15:45
  • @KeyIdeas Oops, can't delete it now. The OP accepted this answer. – Git Gud Jun 09 '13 at 15:49