Reference/mod

From Kx Wiki
Jump to: navigation, search

mod (modulus verb)

x mod y returns the remainder of x%y. Applies to numeric types, and gives type error on sym, char and temporal types.

Syntax

q)r:X mod Y

Example

q)-3 -2 -1 0 1 2 3 4 mod 3
0 1 2 0 1 2 0 1

For a complete list of functions, see the kdb+ Function Reference.

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox