Module math

Source

Functions§

choose
horner
Evaluates a polynomial using Horner’s method.
lsb_index
computes the least-significant bit set.
non_zero_lsb_index
computes the least-significant bit set. Doesn’t return the correct answer if the input is zero
prev_power_of_two
calculate the largest power of 2 less or equal to n
zigzag_encode
Encodes a signed integer into an unsigned integer using zigzag encoding.