next up previous contents index
Next: MODE Up: A Function Reference Previous: MMUL

MOD

 

Syntax: @MOD(X, Y)

X = a numeric value
Y = a numeric value

@MOD returns the remainder of X/Y with the same sign as X. (This function is NOT modulus as sometimes documented.)

Examples:

@MOD(8, 4) = 0

@MOD(D2, F3) = 12, where D2 = 100 and F3 = 44

@MOD(F5, A1) = Error - divide by zero, where F5 = 98.6 and A1 = 0

@MOD(-14, 3) = -2 (the true modulus is 1)


next up previous contents index
Next: MODE Up: A Function Reference Previous: MMUL

NExS User's Guide, Version 1.4.5
Grey Trout Software
11 April 1999