Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: PowerPC Numerics / Part 2 - The PowerPC Numerics C Implementation


Chapter 8 - Environmental Control Functions

This chapter describes how to control the floating-point environment using functions defined in MathLib.

As described in Chapter 4, "Environmental Controls," the rounding direction and the exception flags are the parts of the environment that you can access. You can test and change the rounding direction, and you can test, set, and clear the exceptions flags. You may also save and restore both the rounding direction and exception flags together as a single entity. This chapter describes the functions that perform these tasks. For the definitions of rounding direction and exception flags, see Chapter 4.

Read this chapter to learn how to access and manipulate the floating-point environment in the C language. All of the environmental control function declarations appear in the file fenv.h.

IMPORTANT
If your compiler supports the environmental access switch described in Appendix D, "FPCE Recommendations for Compilers," the switch must be turned on in the program before you use any of the functions described in this chapter.

Chapter Contents
Controlling the Rounding Direction
Controlling the Exception Flags
Accessing the Floating-Point Environment
Environmental Controls Summary
C Summary
Constants
Rounding Direction Modes
Floating-Point Exception Flags
Data Types
Environment Access Routines
Controlling the Rounding Direction
Controlling the Exception Flags
Accessing the Floating-Point Environment

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996