Friday, December 21, 2012

Decimal Rounding

When new time clock software users discover 'missing minutes' on their employee time cards, they are often surprised (and sometimes skeptical) to be told the minutes only appear to be missing. The answer to the missing minutes is how numbers are calculated and displayed in decimal format.

Let's look at a sample time card report for an employee who works a 20-minute shift three times a day with totals displayed as decimals:

08:00 AM to 08:20 AM =.33
12:00 PM to 12:20 PM =.33

05:00 PM to 05:20 PM =.33

Total Hours = 1.0

Since.33 +.33 +.33 =.99, where's the missing time? 20 minutes in decimal format isn't really.33. In realty 20/60 =.3333333 to infinity, but we just use .33 to represent a third of something. So adding .3333333 three times gives us.9999999999 to infinity. We get a number really close to 1, but not exactly 1. Even if we used really long decimals on our time card reports, we'd still never be able to exactly represent 3 twenty-minute shifts as 60 minutes. So we show 20 minutes simply as.33 hours.

Technical Support Team
Redcort Software, Inc.

No comments: