MOD

From STX Wiki
< Programmer Guide‎ | SPU Reference
Revision as of 15:05, 17 May 2010 by 193.171.195.8 (talk) (initial import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

MOD

Usage:

MOD a b

Inputs:
a number or vector
b number or vector
Outputs:
y number or vector (same type as a)
Function:

Compute a modulo b.

if a and b are numbers: y = a mod b

if a is a vector and b a number: y[i] = a[i] mod b

if a and b are vectors: y[i] = a[i] mod b[i]

If the value of b|b[i] is zero, the result y|y[i] is also set to zero.

Navigation menu

Personal tools