Submodule consisting of routines built largely atop bitwise operations.
Non-count operations are mostly functional, though the comments and docs could stand some improvement.
This is pretty open-ended feature-wise, as a lot of things fall into the category of bitwise operations, so things will be added as they're needed.
The "operators" module can be ignored if the require()'ing code knows it has a proper bit library handy; it is merely a way to put the detection / fallback logic all in one place.
Tested on Lua 5.1. (Bit vector test here.)
The vector
module depends on unsigned division constants
support, which is in the rather unstable number_ops
directory (logically it's four or five submodules, I think). However, the division module
will probably be one of the survivors. In any event, the function in question is easy enough to inline.