Added test for floating point error accumulation in axis tick marks, and made minor changes to remove duplicate calculations.