Modulo

Syntax

…num-expr… % …num-expr…

Typing

num1, num2 -> largest(num1, num2)

Description

Compute the modolus of the two given operands.

The result type is the largest of the operand types.

Examples

expression evaluates to
3 % 2 1
-3 % 2 -1
3 % -2 1

See Also

Division Integer division