RedCrab Math Tutorial
 



Modulo

Modulo is the remainder of a Euclidean division. As a standalone feature, modulo is included in most programming languages. It is treated there as a function or operator, usually with the abbreviation mod or %.

In mathematics, it corresponds to the remainder of a division, as described under Euclidean division.

Example: 17 : 5 = 3 remainder 2
In the example above is modulo = 2
 
Dividing numbers with different signs also results in different signs for the results. In the following examples the mathematical division and the modulo function as they are integrated in computers are compared.

 7 :  3 =  2 Rest  1

-7 :  3 = -2 Rest -1

 7 : -3 = -2 Rest  1

-7 : -3 =  2 Rest -1

 7 mod  3 =  1

-7 mod  3 = -1

 7 mod -3 =  1

-7 mod -3 = -1


Arithmetic

Integer and Real Numbers
Complex Numbers
Sets
Roots and Power
Percentage Calculation
Interest Calculation
Absolute Value of a Number
Euclidean division
Modulo - Remainder of a division
Vectors
Matrices
   


           
  Products RedCrab Calculator RedCRab Manual  
      RedCrab Software - Singapore - Sengkang West Way