# WHEN IT COMES TO MATH, COMPUTERS DON’T ADD UP

SHARE WHEN IT COMES TO MATH, COMPUTERS DON’T ADD UP

We learned one thing from spending more than a decade testing hardware and software: When it comes to computers, don't trust a thing.

Yes, Virginia, don't even trust yours to do simple math.For example, there's the computer's handy ability to calculate lightning-fast. Our friend Rohn Engh, who produces several fine newsletters for photographers, recently mentioned that not all his calculators do precise math. Intrigued, we tried his test on the calculator that Microsoft packages with Windows. We divided 99,999,999 by 81. Windows got 1,234,567.888889.

Then we tried it with Sidekick for Windows' calculator. Same numbers. Slightly different result: 1,234,567.888888.

Sure, that's not much of a discrepancy. Nonetheless, if you're a banker calculating interest on a billion dollars, it amounts to plus or minus \$1,000. You could be looking for that thousand bucks for weeks, trying to figure out who pilfered it, never dreaming that the computer's the culprit.

Then we tried the next part of Rohn's calculator test. We multiplied the discrepant results by 81. You'd think we'd have gotten the number we started with. We didn't. Windows gave us 99,999,999. Sidekick came up with 99,999,999.99992 - nearly a dollar off on a hundred million.

Now we were piqued. We punched the numbers into various pocket calculators around the office. All three gave identical answers: 1,234,567.8. But they ran out of space after the first decimal, and that ended up being a disaster. Because when we remultiplied by the same number, we got only 99,999,991. Eight bucks vanished from our hundred million.

We went back to our various computers. First, we checked our Macintosh VXII's calculator. It spit out 1,234,567.8889 - four decimal places instead of the IBMcompatibles' six places. Less accurate? No, sir! When we multiplied that result by 81, the Mac came up with 99,999,999 on the button, proving itself at least as good as Windows at doing math.

We next tried using Cruncher, Davidson's fine Mac spreadsheet program for kids. It proved its vigor by dividing to 11 places, giving us 1234567.88888888889. And when we multiplied back, it, too, gave us the correct number: 99,999,999.

We went back to our PCs, and ran the test on a 3-year-old ALR 386/33 that has a Cyrex math coprocessor. The coprocessor is an extra chip we added to our IBM clone. Later, Intel included math coprocessors in its 486 and Pentium chip lines. The "math" chip obeys programmers' instructions for calculating numbers with greater precision and with longer rows of significant digits.

But even with its smart math chip, it gave us the same results: correct with Windows' calculator, incorrect with Sidekick. Why? Sidekick's programmers had settled for imprecision with or without a math coprocessor. On the basis of our small evidence, we must conclude that only the Mac consistently gets its math right.

Some computer scientists would argue that the near misses we got aren't errors, simply differences in how the calculators were programmed to round off the numbers before, during and after calculations. But there can be no argument that our results do prove that computers aren't completely dependable. Except for simple math like adding two and two, they can be downright unreliable unless programmers protect us from the limitations of their chips.

To be fair to us users, every computer program should be sold with a warning about how big a number you can work with and still be accurate. And no programmer should allow you to try to stretch a program beyond its limits.

But until fairness reigns in the marketplace, maybe you should never buy a computer, a program, or a calculator without checking its calculating limitations.

Talking about spreadsheets, we got into trouble last month because we trusted our Excel spreadsheet program too much. It wasn't even a matter of numbers crunching - we thought.

Needing a temporary safe haven for filing our new newsletter's subscriber information and toting up subscription income, we typed it all into Excel. For subscribers paying monthly by credit card, we included a column that listed credit card numbers.

Whoops! First month after that, we got a lot of rejects from our credit card clearing house. We couldn't believe we'd signed up so many deadbeats, so we rechecked our slips against Excel's credit card numbers. Sure enough, we'd copied them all correctly to each slip. But wasn't it curious, we noticed, how every rejected card number ended in a zero.

So we pulled out our order file and checked those card numbers against Excel's. Sure enough, not one of the original numbers ended in a zero. Some of the numbers were 12 digits long, others 16 digits long. None had a decimal point. Why had Excel "rounded" each number to end in zero? We examined our "formulas" for the column. None existed. We examined formats. Nothing special there. We examined alignment. Still no clue. Finally, Frank stopped trying to find the problem and came up with a solution. He put a quote mark in front of every credit card number. That fooled Excel into thinking they were words. Since it's not programmed to round off words, it now stores the numbers exactly the way we type them in.

But Judi imagines disaster happening the first time we forget to type in the initial quote mark. "If we have to turn numbers into words," she said, "why don't we just keep these lists in our word processing program? Besides, it can add columns of numbers just like Excel." Guess who won.