Qu

rem

Builtin index · Core maths

rem(a, b)

Input: a, b · Output: no output

What it is

Remainder with the sign of the dividend (MATLAB rem, C fmod): rem(-7, 3) is -1, rem(7, -3) is 1. The mod operator is the other convention — sign of the divisor: -7 mod 3 is 2. rem(x, 0) is NaN. Same broadcasting as atan2.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
rem(a, b)
a —not documented yet
b —not documented yet
not documented yetRemainder with the sign of the dividend (MATLAB rem, C fmod): rem(-7, 3) is -1, rem(7, -3) is 1. The mod operator is the other convention — sign of the divisor: -7 mod 3 is 2. rem(x, 0) is NaN. Same broadcasting as atan2.

Examples

No documentation example calls this form yet. The Core maths chapter is where one belongs.