Bitwise 'modulus' (remainder after integer divide)
This takes two arguments. Both are converted to signed 'long long' (64-bit integers). The result is modulus - the remainder after doing an integer divide of the first argument by the second argument.
See Also ...
bit.ashr - Shifts a number right, preserving sign
Lua base functions
(Help topic: lua=bit.mod)
Enter a search string to find matching documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )