Fixed some floating point errors due to lack of precision when truncating from
80-bit to 64-bit. Instead of truncating, this will round up if
appropriate.