Operators

%

Supported By

Syntax

expression % expression

Each expression yields an integer, a number, or a complex.

Description

The % operator evaluates to the remainder after division of the given values.

Notes

If either given value is a complex, the evaluated value will be a complex. Otherwise, the evaluated value will be a number.

The expression x % y is equivalent to x-y*trunc(x/y).

Synonym

rem

See Also

modulo, mod, /, quot, div, trunc