accuracy of scientific calculators

2
I PEASE (Tholights 0.11, the Accuracy Li?)l its of Scie?ztijk Calczdators ...) ow willingly we trust our calculators! Yet, like ev- erything else, these ubiq- uitoustools do havelimits. In particular. their accuracy limits are beginning to show in our ever more complex and precise engineering cal- culations. To illustrate the problem, here'>a simple calculation that you can woi-k on your own calculator: Remembering the trigonometric identity for squared sines and cosines, BOB PEASE ( )13T;lIh-IL) A 13\1.:1,: I~IK~,44 MIT I \ 1961 AND IS \.1.,\1,.1: \(:IllU7'1S7' Al' \ \-l-lOIYAl> 41. \ II(:ONI)L7CT- ()K (;ORI'., \ \\'l'.A CI,.iK.i, . ... ( 4l.ll- you know the an- swer has to be zero. But your. 10-digit calculator proba- blygives anansn-er on the order of 4 x 10V, a much larger discrepancy than you would expect from the calcula- tor's claimed 10- digit resolution. This error, of course, comes from accumulated trun- cation and round- off errors in the transcendental al- gorithms - the computational ver- sion of NOISE. Another source of squirrelly read- ings is the low volt- - age let els used in modern calculators. The MOSFET ICs'inherent analogun- t1elyinning.s become apparent at low supply voltages, where channel volt- ageh may vary only 10:l between the 1 and 0 digital states. In essence, each E L E FET is a linear amplifier at both of its digital extremes. As a linear amplifier, it can pick up and amplify strong RF or pulsed fields. For some plastic-cased models, operationnearaterminal's hor- izontal transformer, a radar transmit- ter, or a medium-frequency broadcast station can jump the display reading without any apparent cause. The calculator IC's analog roots are, in fact, the reason why you can't buy portable scientific calculators with better than 12-digit precision. It be- comes a matter of voltage regulation. The battery's voltage drops about 40% as its energy is drained. Ordinary cal- culator chips have Power-Supply Re- jection Ratios on theorderof l8Oto2lO dB, allowing8 to 10 digit calculators to operate without error (lO'")uD"l dB = 10'0 = 10 digits). Leading-edge compa- nies like H P and TI use voltage regu- lators and factory calibration to gain another 60 dB ofsuppression, bringing dependable performance to the 13- digit level. But that's about it for portable units. Although careful analog design keeps PSRR errors below digital sig- nificance in scientific calculators, those techniques can't provide the high precision needed in accounting calculators. Consequently, calculating a really large number - such as the bottom line for the second overrun of a military hardware contract - will show some variable errors in the last digits on a 14-digit accounting calcula- tor. In fact, aerospace accountanth are rumored to earn their lunch money simply by changing to fresh calculator batteries before the final column addi- tion. Fortunately for them, "calculator faith" hides these smalltransgressions T R O N I C D E S I G N A t'RII, 2, 1!m2 from the GAO (Government Account- ing Office). The accounting calculators repre- sent alarge market, and their accuracy demands will likely fuel research for improved battery and regulator tech- nologyin thenext decade. Japanesere- searchers hope to produce accurate 14- digit machines by the turn of the century, spurred by suspicions of lour- battery use when converting trade- balance dollars to yen. Despite these incremental improvements, however, some analog experts smugly hint that digital engineers will never design a calculator accurate to one part in 1016. Analog engineers in the know infer that the Digital Illusion can't be sup- ported beyond 16 digits. At that preci- hion, the digital two-state simplicity collapses and all circuits revert to their basic analog nature. The prima donna digital engineers must then face the dirty "real world" uncertainties that we analog engineers face every day. Just as playtime for digital bus design ended at 20-MHz data rates, the Dig- tal Illusion ends at 16 digits. The analog engineer - always thoughtful, physically attractive, and suave - doesn't base the Digital Illu- sion's limit on mere speculation. Nay, this limit has roots deep in theoretical physics, a subject quite familiar to the analog engineer's restless intellect. In fact, it's the famous Heisenberg Un- certainty Principle that imposesanab- solute 19-digit limit on digital-calcula- tor accuracy. In 1927, as many experienced analog engineers will re- call, Heisenberg recognized that the minimum energy kicked into a system (when making a measurement) is in- versely proportional to the measure- ment time. That is, dE x dt can never be less than Planck's constant, 4.14 x 101klectron volts per Hertz (eV/Hz). Consequently, the longer you take to do something, the less disruptive en- ergy isinjected,and themoreexact the result. The occurrence of an Uncertainty Error is, of course,probabilistic. It can occur in any calculation, as students of engineering quickly discover, but it is much larger and more likely in calcu- lations where the disruptive energy is large - i.e., where the calculation time

Upload: soumyajit-pradhan

Post on 21-Jul-2016

3 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Accuracy of Scientific Calculators

I

PEASE

(Tholights 0.11,the Accuracy Li?)lits of Scie?ztijk Calczdators ...)

ow willingly we trust our calculators! Yet, like ev- erything else, these ubiq- uitoustools do havelimits.

In particular. their accuracy limits are beginning to show in our ever more complex and precise engineering cal- culations. To illustrate the problem, here'> a simple calculation that you can woi-k on your own calculator:

Remembering the trigonometric identity for squared sines and cosines,

BOB PEASE ( )13T;lIh-IL) A 13\1.:1,: I~IK~,44MIT I \ 1961 A N D IS \.1.,\1,.1: \(:IllU7'1S7' Al' \ \-l-lOIYAl> 41. \ II(:ONI)L7CT-( ) K (;ORI'., \ \ \ ' l ' .A CI,.iK.i, . . . .

( 4l.ll-

you know the an- swer has to be zero. But your. 10-digit calculator proba- blygives anansn-er on the order of 4 x 10V, a much larger discrepancy than you would expect from the calcula- tor 's claimed 10- digit resolution. This e r r o r , of course, comes from accumulated trun- cation and round- off e r r o r s in t h e transcendental al- g o r i t h m s - t h e computational ver- sion of NOISE.

Another source of squirrelly read- ings is the low volt- -

age let els used in modern calculators. The MOSFET ICs'inherent analogun- t1elyinning.s become apparent a t low supply voltages, where channel volt- ageh may vary only 10:l between the 1 and 0 digital states. In essence, each

E L E

F E T is a linear amplifier a t both of its digital extremes. As a linear amplifier, it can pick up and amplify strong R F or pulsed fields. For some plastic-cased models,operationnearaterminal's hor-izontal transformer, a radar transmit- ter, or a medium-frequency broadcast station can jump the display reading without any apparent cause.

The calculator IC's analog roots are, in fact, the reason why you can't buy portable scientific calculators with better than 12-digit precision. I t be- comes a matter of voltage regulation. The battery's voltage drops about 40% as its energy is drained. Ordinary cal- culator chips have Power-Supply Re- jection Ratios on theorderof l8Oto2lO dB, allowing8 to 10 digit calculators to operate without error (lO'")uD"l dB = 10'0 = 10 digits). Leading-edge compa- nies like H P and TI use voltage regu- lators and factory calibration to gain another 60 dB ofsuppression, bringing dependable performance to the 13- digit level. But that 's about i t for portable units.

Although careful analog design keeps PSRR errors below digital sig- nificance in scientific calculators, those techniques can't provide the high precision needed in accounting calculators. Consequently, calculating a really large number - such as the bottom line for the second overrun of a mili tary hardware contract - will show some variable errors in the last digits on a 14-digit accounting calcula- tor. In fact, aerospace accountanth are rumored to earn their lunch money simply by changing to fresh calculator batteries before the final column addi- tion. Fortunately for them, "calculator faith" hides these smalltransgressions

T R O N I C D E S I G N A t'RII, 2,1!m2

from the GAO (Government Account- ing Office).

The accounting calculators repre- sent alarge market, and their accuracy demands will likely fuel research for improved battery and regulator tech- nologyin thenext decade. Japanesere- searchers hope to produce accurate 14- digit machines by the t u r n of the century, spurred by suspicions of lour- battery use when converting trade- balance dollars to yen. Despite these incremental improvements, however, some analog experts smugly hint that digital engineers will never design a calculator accurate to one part in 1016.

Analog engineers in the know infer that the Digital Illusion can't be sup- ported beyond 16 digits. At that preci- hion, the digital two-state simplicity collapses and all circuits revert to their basic analog nature. The prima donna digital engineers must then face the dirty "real world" uncertainties that we analog engineers face every day. Just as playtime for digital bus design ended a t 20-MHz data rates, the Dig- tal Illusion ends a t 16 digits.

The analog eng ineer - a lways thoughtful, physically attractive, and suave -doesn't base the Digital Illu- sion's limit on mere speculation. Nay, this limit has roots deep in theoretical physics, a subject quite familiar to the analog engineer's restless intellect. In fact, it's the famous Heisenberg Un-certainty Principle that imposesanab- solute 19-digit limit on digital-calcula- t o r accuracy. I n 1927, a s many experienced analog engineers will re- call, Heisenberg recognized that the minimum energy kicked into a system (when making a measurement) is in- versely proportional to the measure- ment time. That is, d E x dt can never be less than Planck's constant, 4.14 x 101klectron volts per Hertz (eV/Hz). Consequently, the longer you take to do something, the less disruptive en- ergy isinjected,and themoreexact the result.

The occurrence of an Uncertainty Error is, of course,probabilistic. I t can occur in any calculation, as students of engineering quickly discover, but i t is much larger and more likely in calcu- lations where the disruptive energy is large - i.e., where the calculation time

Page 2: Accuracy of Scientific Calculators

PEASE PORRIDGE

is short ( o r when you a re in a big hurry). Consider some facts from your own experience ...calculations done on a Cray super-computer a t gigaflops rates (earthquake prediction, rainfall prediction, national debt prediction, origins of the universe) are subject to great uncertainties, whereas compu- tations done on a slide rule a t deciflops rates (resistor values, the price of 12 op

amps) are seldom wrong by more than 5%.These Uncertainty Ratios remain valid even a t microflop rates. For ex- ample, computer programs that re- quire several man-years of debugging are much more reliable than those that worli the first time.

Calculating the 19-digit limit is be- yond the scope ofthis short article, but is recommended ah an exercise for the

Gentle Reader. Start with Maxwell's equations. Usea3.6-Vlithium battery, 2N3904 t r a n s i s t o r s , and 99.2 e V (12.648 nm) lithography to establish boundary conditions (savvy analog en- gineers will use their slide rule's div, curl, and grad scales to make quick work of the vector differential equa- tions). Your answer may differ some- what from 19, depending on how much you rush the calculations. If you must use a digital computer, analog engi- neers amicably recommend that you stick with an Apple I, Altair 680, IM- SAI 8080, or PDP-8 models to mini- mize spurious answers.

I hope this peeli into calculator the- ory will dispel the blind trust in calcu- lator and computer results, and in all that complex digital stuff. Now that you've been alerted to a future of con- tinuing digital problems, you will not be surprised when your nai've col- league's new 17-digit calculator sinks intoDigitalNirvanawhen tryingtopin down the penultimate digit. You u7ill know that calculators, like everything else, face limits. The Digital Illusion can't shelter us indefinitely. Although the affable, warm-hearted analog en- gineers have used all of the technology a t their disposal to stretch the Illusion over the last 40 years, their numbers dwindle, and the digital engineer's age of innocence must end. A moment of si- lence, please, for those generous ana- log folks who have worked so continu- ously and indiscreetly during these long, hard years.

Now just a couple of final comments from RAP: While I would love to say that I wrote this, I must give all the credit to James A. Kuzdrall, P . E., Chief Engineer a t Intrel Service Co., P.O. Box 1247, Nashua, NH 03061. When I saw Mr. Kuzdrall's draft of this, I knew it was a perfect choice for this guest editorial. He's a man after my own heart.

And, Lastly, April Foo L!

All for now. / Comments invited! RAP / Robert A. Pease / Engineer

Address: Mail Stop C2500A National Semiconductor P.O. Box 58090 Santa Clara, CA 95052-8090