A better test for gh-99
Fix a longstanding latent bug
Add more near-boundary-condition tests for bounded ints
Fix miscounting of digits (gh-99)