To avoid potential numeric rounding issues

Converted to integers, 1/64th a block is sufficient precision.
Integer arithmetic is deterministic.

The commented out code is the correct floating point round-away-from-zero code from
from http://stackoverflow.com/a/8387368/432976

This code was written in github and is untested.