Fix silly error where I thought 2^b was number of digits, not b
Merge branch 'fix-bad-math'