render: Use "long long" instead of "double" for arithmetic.
When I wrote this code in 2010, it seemed reasonable to me to use
floating-point arithmetic to do large integer calculations, because 64-bit
machines were not yet pervasive. Over 8 years later, 32-bit machines are
now a rarity. This commit switches types and modernizes the coding style.
This fixed an assertion failure that I was getting mysteriously while
rendering a particular table. I didn't investigate further because using
integers seemed like a much better idea anyway.