This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Built-in Functions / Mathematical Functions / Numerical Functions /

Further Examples: Mod

Here are a few examples.

In[1]:=

Out[1]=

In[2]:=

Out[2]=

In[3]:=

Out[3]=

When reducing modulo n, you can reduce to any consecutive set of n integers.

In[4]:=

Out[4]=

In[5]:=

Out[5]=

In[6]:=

Out[6]=

You can use Simplify to simplify some expressions involving Mod.

In[7]:=

Out[7]=

Here an expression equivalent to Mod[m, n] is obtained by using FullSimplify with its ComplexityFunction option.

In[8]:=

Out[8]=