Fixes bug #7 where the program value was wrapping incorrectly (corrupting the program) for large program values.
The cause was rounding errors in math.log()
which are now avoided by using a custom abct.math function flog2()
which calculates the floor of log2 by taking the bit_length()
of an integer minus 1, which sidesteps any need for rounding.