Apple 1.1.2 manual =x2, x=Ãy y=375x, x=yÖ375, Careful Rounding

Page 39
G(y)
G(y)

Technical Considerations

If an invalid input is provided or if the result cannot be represented exactly, a floating-point exception must be raised.

Careful Rounding

If the result of an IEEE arithmetic operation cannot be represented exactly in binary format, the number is rounded. IEEE arithmetic normally rounds results to the nearest value that can be represented in the chosen data format. The difference between the exact result and the represented result is the roundoff error.

The IEEE standard requires that users be able to choose to round in directions other than to the nearest value. For example, sometimes you might want to know that rounding has not invalidated a computation. One way to do that would be to force the rounding direction so that you can be sure your results are higher (or lower) than the exact answer.

Because it conforms to the IEEE standard, PowerPC Numerics gives you a means of doing that. Fully developed, this strategy is called interval arithmetic (Kahan 1980).The following example is a simple demonstration of the advantages of careful rounding.

Suppose your application performs operations that are mutually inverse; that is, operations y=f(x), x=g(y), such that g( f(x))=x. There are many such operations, such as

y=x2, x=Ãy y=375x, x=yÖ375

Suppose F(x) is the computed value of f(x), and G(y) is the computed value of g(y). Because many numbers cannot be represented exactly in binary, the computed values F(x) and will often differ from f(x) and g(y). Even so, if both functions are continuous and well behaved, and if you always round F(x) and

to the nearest value, you might expect your computer arithmetic to return x when it performs the cycle of inverse operations, G(F(x))=x.

It is difficult to predict when this relation will hold for computer numbers. Experience with other computers says it is too much to expect, but IEEE arithmetic very often returns the correct inverse value.

The reason for IEEE arithmeticÕs good behaviour with respect to inverse operations is that it rounds so carefully. Even with all operations in, say, single precision, it evaluates the expression 3x1/3 to 1.0 exactly; some computers that do not follow the standard do not evaluate this expression exactly.

Technical Considerations

33

iMalc Manual

Image 39
Contents Calculate Different Eyecatcher IMalc System requirements ConventionsAssumptions Contents List of illustrations Introduction Introduction Calculator operation Quick StartDisplay Hidden functionsUsing the keyboard Error codesChanging the appearance Preferences file Icons InterfaceWindows Interface Interface Interface Interface Interface Interface Menus Interface Interface Calculator Operation Calculator OperationCalculator Operation Keys Operation Log natural ln becomes e Display Using the keyboard Preferences File Flavours Bondi iMalc Strawberry iMalc G3Calc Blueberry iBookCalc How computers handle maths Technical ConsiderationsTechnical Considerations Careful Rounding =x2, x=Ãy y=375x, x=yÖ375About the Fpce Technical Report Exception HandlingAbout Floating-Point Data Formats PowerPC Numerics Versus SaneInterpreting Floating-Point Values Normalized Numbers Infinities Denormalized NumbersZeroes NaNsRanges Range of numbersRanges of functions Technical Considerations Trigonometry units Error codesThird release, 12th October Version HistoryProposed future enhancements Where to get the latest versionShareware RegistrationPricing Registering Registering OnlineRegistering by email, fax or post Payment Instructions Using Register iMalcRegistration Payment by cash or US$ check/money order Payment by credit card or First VirtualAfter you have registered USASupport@kagi.com Technical SupportContacting Eyecatcher About EyecatcherLegal Information CopyrightTrademarks Software License Legal Information Legal Information Bibliography Other InformationCredits Eyecatcher@kagi.com Useful contactsHttp//hyperarchive.lcs.mit.edu/HyperArchive.html Ansi IndexIndex Sign change key Index