Map and Table Calculation

MOD operator

The modulus operator returns the remainder of a divided by b, i.e. a MOD b.

Syntax

a MOD b

Input

a is a value
Domain type: any Value domain
b is a value
Domain type: any Value domain

Output

MOD returns: a integer value
Domain: system domain Value

Notes:

Tip:

When the definition symbol = is used, a dependent output map or dependent output column is created; when the assignment symbol := is used, the dependency link is immediately broken after the output map/column has been calculated.

Usable in

MapCalc, TabCalc, Simple calculators

Examples

Pocket line calculator examples:

? 10 MOD 3

returns 1

? 10 MOD 12

returns 10

MapCalc example:

OutMap = InMapA / InMapB

 

InMapA

InMapB

OutMap

10 11 12
-10 10 10
-10 ? 10
5 5 5
5 0 -3
3 -2 12
0 1 2
0 ? 1
? ? 10

TabCalc example:

OutCol = InColA MOD InColB

 

InColA

InColB

OutCol

10

5

0

11

5

1

12

5

2

-10

5

0

10

0

?

10

-3

1

-10

3

?

?

-2

?

10

12

10

See also:

+ /
- ^