Modulus

Mnemonic mod
Statement x = a % b
Description Sets x to the reminder of a divided by b with integer division. The result is 0 <= x < b. Another way at looking at it is that x = a - q*b, where q is the integer quotient when a is divided by b using integer division. Invalid operand if 1) a is negative, 2) b is zero or 3) b is negative.
Type Computational
Categories
  • arithmetic
Variants
mmd x = a % b
mid x = a % 2
imd x = 3 % b
iid x = 3 % 2
Types
Exceptions
  • invalid operand
Relaxations
  • binary
  • exception
Contact Information

We would be more than happy to help you. Our opening hours are 9–15 (CET).

[email protected]

📞 (+47) 93 68 22 77

Nils Bays vei 50, 0876 Oslo, Norway

Copyright © 2018-24 progsbase.com by Inductive AS.