Mathematica 9 is now available

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]=



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.