mod -- remainder for integers |
Syntax |
mod(N: INT, D: INT): INT |
Description |
Example |
/**/ mod(10,3); 1 /**/ mod(-10,3); -1 /**/ // How to test if two numbers are equivalent modulo M /**/ A := 10; B := -5; M := 3; /**/ mod(A-B,M) = 0; // CORRECT! true /**/ mod(A,M) = mod(B,M); // WRONG!! Do not do this! false |
See Also |