- Synopsis
**REMAINDER**`dividend`

`divisor`

- Description
Outputs the remainder of dividing

by`dividend`

. Both`divisor`

and`dividend`

must be numbers and`divisor`

must not be 0.`divisor`

Mathematically, a remainder is a number such that

dividend = quotient * divisor + remainderWhere quotient is an integer and -divisor < remainder < divisor. By this definition, two remainders may be possible for a given divisor and dividend, one positive and one negative. To make REMAINDER well-defined, it always outputs the remainder whose sign matches that of

. In contrast, MODULO uses the sign of`dividend`

.`divisor`

- Example
2`SHOW REMAINDER 5 3`

-2`SHOW REMAINDER -5 3`

0.2`SHOW REMAINDER 3.8 1.2`

- See Also
MODULO