Apple 1.1.2 manual Exception Handling, About the Fpce Technical Report

Page 40

Technical Considerations

34

Technical Considerations

Exception Handling

The IEEE standard defines five exceptions that indicate when an exceptional event has occurred. They are

invalid operation

underflow

overflow

division by zero

inexact result

There are three ways an application can deal with exceptions:

Continue operation.

Stop on exceptions if the programmer thinks they will invalidate results.

Include code to do something special when exceptions happen.

The IEEE standard lets programs deal with the exceptions in reasonable ways. It defines the special values NaN (Not-a- Number) and Infinity, which allow a program to continue operation. The IEEE standard also defines exception flags, which a program can test to detect exceptional events.

About the FPCE Technical Report

Even though many computers now conform to the IEEE standard, the standard has suffered from a lack of high-level portability. The reason is that the standard does not define bindings to high- level languages; it only defines a programming environment.

For instance, the standard defines data formats that should be supported but does not tell how these data formats should map to variable types in high-level languages. It also specifies that the user must be able to control rounding direction but falls short of defining how the user is able to do so.

However, the definition of a binding is in progress for the C programming language. The Floating-Point C Extensions (FPCE) branch of the Numerical C Extensions Group (NCEG), or ANSI X3J11.1, has proposed a general floating-point specification for the C programming language, called the FPCE technical report, that contains additional specifications for implementations that comply with IEEE floating-point standards 754 and 854.

The FPCE technical report not only specifies how to implement the requirements of the IEEE standards, but also requires some additional functions, called transcendental functions (sometimes called elementary functions). These functions are consistent with the IEEE standard and can be used as building

iMalc Manual

Image 40
Contents Calculate Different Eyecatcher IMalc Conventions System requirementsAssumptions Contents List of illustrations Introduction Introduction Quick Start Calculator operationHidden functions DisplayError codes Using the keyboardChanging 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 ZeroesRange of numbers RangesRanges of functions Technical Considerations Error codes Trigonometry unitsVersion History Third release, 12th OctoberWhere to get the latest version Proposed future enhancementsRegistration SharewarePricing Registering Online RegisteringRegistering 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 EyecatcherCopyright Legal InformationTrademarks 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