Module twenty_first::shared_math::other
source · Functions
Convert a number to an array showing which bits are set in its bit representation
Simultaneously perform division and remainder.
Check if the number is a power of two: { 1,2,4 .. }
[Bit Twiddling Hacks]: https://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2
Generate
n
random elements using rand::thread_rng()
.Round up to the nearest power of 2
Matrix transpose
Extended Euclid’s Algorithm.