Function reference · Math

mod

Computes the remainder modulo another expression for supported numeric inputs.

Numeric arguments use Nerdamer's modulus implementation. Unsupported symbolic cases remain as mod(a,b), and undefined inputs such as a zero modulus are rejected.

Examples

These examples use Nerdamer Notation.

Compute a simple integer remainder.

mod(7,2)
// → 1

Interfaces

The same operation is available through the interfaces below.

Nerdamer Notation · nerdamer API

Nerdamer Notation

Use this form inside input passed to nerdamer(...).

mod(arg1, arg2)

nerdamer.mod

Call the operation through the default nerdamer import.

nerdamer.mod(x: Expression, y: Expression): Expression

Parameters

NameTypeDescription
xExpressionThe dividend.
yExpressionThe divisor.

Returns

Expression — The remainder of `x / y`.

Browse the nerdamer API →

← Back to Reference