1
$\begingroup$

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?

$\endgroup$
0

2 Answers 2

2
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ Nice when you add links +1 $\endgroup$
    – Amzoti
    Commented Jun 10, 2013 at 0:07
1
$\begingroup$

You can say $y=x\pmod 4$

See modular arithmetic.

$\endgroup$
5
  • $\begingroup$ That would be less ambiguously written as $\ y = (x\ {\rm mod}\ 4),\ $ which avoids it being misinterpreted as $\ y\equiv x\pmod 4.$ $\endgroup$
    – Key Ideas
    Commented Jun 9, 2013 at 15:37
  • $\begingroup$ @KeyIdeas Is that notation even used? I've never seen it. $\endgroup$
    – Git Gud
    Commented Jun 9, 2013 at 15:40
  • $\begingroup$ $ 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). $\endgroup$
    – Key Ideas
    Commented Jun 9, 2013 at 15:43
  • $\begingroup$ @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. $\endgroup$
    – Git Gud
    Commented Jun 9, 2013 at 15:45
  • $\begingroup$ @KeyIdeas Oops, can't delete it now. The OP accepted this answer. $\endgroup$
    – Git Gud
    Commented Jun 9, 2013 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .