Apple 1.1.2 manual Technical Considerations

Page 38

Technical Considerations

32

Technical Considerations

as binary floating-point numbers. Binary floating-point numbers can represent real numbers exactly in relatively few cases; in all other cases the representation is approximate.

For example, 1/2 (0.5 in decimal) can be represented exactly in binary as 0.1. Other real numbers that can be represented exactly in decimal have repeating digits in binary and hence cannot be represented exactly, as shown below. For example, 1/10, or decimal 0.1 exactly, is 0.000110011 . . . in binary.

Errors of this kind are unavoidable in any computer approximation of real numbers. Because of these errors, sums of fractions are often slightly incorrect. For example, 4/3 Ð 5/6 is not exactly equal to 1/2 on any computer, even on computers that use IEEE standard arithmetic.

Fraction

Decimal approximation*

Binary approximation

1/10

0.1000000000à

0.000110011001100110011001101

1/2

0.5000000000à

0.100000000000000000000000à

4/3

1.333333333

1.01010101010101010101011

5/6

0.8333333333

0.110101010101010101010101

4/3 Ð 5/6

0.4999999997

0.100000000000000000000001

* 10 significant digits 23 significant digits à Exact value

The IEEE standard defines data formats for floating-point numbers, shows how to interpret these formats, and specifies how to perform operations (known as floating-point operations) on numbers in these formats. It requires the following types of floating-point operations:

basic arithmetic operations (add, subtract, multiply, divide, square root, remainder, and round-to-integer)

conversion operations, which convert numbers to and from the floating-point data formats

comparison operations, such as less than, greater than, and equal to

environmental control operations, which manipulate the floating-point environment

The IEEE standard requires that the basic arithmetic operations have the following attributes:

The result must be accurate in the precision in which the operation is performed. When a numerics environment is performing a floating-point operation, it calculates the result to a predetermined number of binary digits. This number of digits is called the precision. The result must be correct to the last binary digit.

If the result cannot be represented exactly in the destination data format, it must be changed to the closest value that can be represented, using rounding.

iMalc Manual

Image 38
Contents Calculate Different Eyecatcher IMalc Assumptions System requirementsConventions Contents List of illustrations Introduction Introduction Quick Start Calculator operationHidden functions DisplayChanging the appearance Using the keyboardError codes Preferences file Interface IconsWindows 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 Technical Considerations How computers handle mathsTechnical Considerations =x2, x=Ãy y=375x, x=yÖ375 Careful RoundingException Handling About the Fpce Technical ReportPowerPC Numerics Versus Sane About Floating-Point Data FormatsInterpreting Floating-Point Values Normalized Numbers Denormalized Numbers InfinitiesNaNs ZeroesRanges of functions RangesRange of numbers Technical Considerations Error codes Trigonometry unitsVersion History Third release, 12th OctoberWhere to get the latest version Proposed future enhancementsRegistration SharewarePricing Registering by email, fax or post RegisteringRegistering Online Using Register iMalc Payment InstructionsRegistration Payment by credit card or First Virtual Payment by cash or US$ check/money orderUSA After you have registeredTechnical Support Support@kagi.comAbout Eyecatcher Contacting EyecatcherTrademarks Legal InformationCopyright Software License Legal Information Legal Information Other Information BibliographyCredits Useful contacts Eyecatcher@kagi.comHttp//hyperarchive.lcs.mit.edu/HyperArchive.html Index AnsiIndex Sign change key Index