Home / list of functions

List functions for work with basic_integer. Includes mathematical and bitwise operations.

Mathematical functions
fullmul returns result of multiplication with twice width
abs returns absolute value of integer
modpow returns result of modular exponentiation
sqr returns square of integer with twice width
isqrt returns integer square root
gcd returns greatest common divisor
lcm returns least common multiple
Bitwise functions
rotl
rotr
returns rotated integer
clz returns count of leading zeros
ctz returns count of trailing zeros
popcount returns count of 1-bits
byteswap flip byte order in integer