Apple 1.1.2 manual Interpreting Floating-Point Values

Page 42

Technical Considerations

36

Technical Considerations

each data format have a sign bit (s), an exponent field (e), and a fraction field (f). For each format, it lists requirements for the minimum lengths of these fields. For example, the standard describes a 32-bit single format whose exponent field must be 8 bits long and whose fraction field must be 23 bits long.

The only required data format is the 32-bit single format. A 64- bit double format is strongly recommended. The IEEE standard also describes two data formats called single-extendedand double-extendedand recommends that floating-point environments provide the extended format corresponding to the widest basic format (single or double) they support.

To conform to the IEEE requirements on floating-point data formats, the PowerPC Numerics environment provides three data formats: single (32 bits), double (64 bits), and double-double (128 bits).

The single and double formats are implemented exactly as described in the standard. The double-double format is provided in place of the recommended double-extended format. IEEE requires that the double-extended format be at least 79 bits long with at least a 15-bit exponent. The double-double format is 128 bits long and has an 11-bit exponent.

The double-double format is just what its name sounds like: two double-format numbers combined. The PowerPC assembly- language multiply-add instructions, which multiply two double- format numbers and add a third with at most one roundoff error, make implementing the double-double format much more efficient than implementing a true IEEE double-extended format.

The IEEE standard also makes requirements about how the values in these data formats are interpreted. PowerPC Numerics follows these requirements exactly.

iMalc uses doubles for all calculations.

Interpreting Floating-Point Values

Regardless of which data format (single, double, or double-double) you use, the numerics environment uses the same basic method to interpret which floating-point value the data format represents.

Every floating-point data format has a sign bit, an exponent field, and a fraction field. These three fields provide binary encodings of a sign (+ or Ð), an exponent, and a significand, respectively, of a floating-point value. The value is interpreted as

± significand x 2exponent-bias

iMalc Manual

Image 42
Contents Calculate Different Eyecatcher IMalc System requirements ConventionsAssumptions Contents List of illustrations Introduction Introduction Quick Start Calculator operationHidden functions DisplayUsing the keyboard Error codesChanging the appearance 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 Range of numbersRanges of functions Technical Considerations Error codes Trigonometry unitsVersion History Third release, 12th OctoberWhere to get the latest version Proposed future enhancementsRegistration SharewarePricing Registering Registering OnlineRegistering by email, fax or post 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 EyecatcherLegal Information CopyrightTrademarks 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