Closed Rudxain closed 2 years ago
Out of scope for this library. Since this allows integers of arbitrary size, there is nothing particularly special about 32-bit or 64-bit numbers, compared to, say, 128-bit numbers or 256-bit numbers.
These values should be easy enough to define in your own code.
What about having a function to generate a n-bit Mersenne number? Doing bigInt.one.shiftLeft(n).prev()
or bigInt.minusOne.shiftLeft(n).not()
is more cumbersome than bigInt.mersenne(n)
Fairly niche function and easy enough to implement in userland.
Fair enough
Having constants for the maximum and minimum 32bit and 64bit values is useful, especially for bit-masking, and clamping