Skip to content

Mod

Mod[x, y] finds the remainder when x is divided by y.

Attributes[Mod] := {Listable, NumericFunction, Protected, ReadProtected}

Simple examples

In[1]:= Mod[5, 3]
Out[1]= 2
In[2]:= Mod[0, 3]
Out[2]= 0
In[3]:= Mod[2, 0]
Out[3]= Indeterminate
In[4]:= Mod[-2*Pi, 3*Pi]
Out[4]= Pi