Flashback Friday: Give them a headache and they might be generous
It’s the mid-1980s, and this pilot fish is working on a project to convert his company’s payroll system from one proprietary mainframe to a newer model.
“After converting the system, we did parallel runs for the same week between old and new hardware,” says fish.
And lo and behold, the newer hardware comes up with a total payroll that’s 8 cents less than the run on the old hardware. An intense effort over a long weekend is required to uncover the problem. What fish’s team finds in the end is that the 8-cent difference is spread among three hourly employees— the only people who received pay raises that week.
Digging into the calculation of the hourly rate, fish and his team discover that it’s calculated in COBOL to nine decimal places, and then rounded to three decimal places in an unusual way: The last six decimal places are split off, and if the value is greater than zero, the third decimal place is rounded up by one.
With more digging, the team finds that for all three employees who got raises, those last six decimal places are zero. The new system correctly leaves the hourly rates alone — but the old system is rounding them up, which is where the 8-cent difference comes from.
But why? Still more digging, and the team realizes the answer is the new hardware.
“The new hourly rate was initially calculated as a signed field,” fish explains. “On the new hardware, the sign bit was over the most significant digit of the number. But on the old system, the sign bit was carried over the least significant digit — the ninth decimal place.
“So when they separated out the last six decimal places, those digits were always greater than zero — and thus always rounded up. The old payroll system had been running for years, and no one had ever caught this.
“And payroll’s solution to this? They said, ‘Just have the new system always round up by one.’
“Yes, it’s true — for once, the bean counters gave away money!”
Feed the Shark! Send me your true tales of IT life at firstname.lastname@example.org. You can also subscribe to…