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 / Controlling the Exception Flags


fesetexcept

You can use the fesetexcept function to restore the values of the floating-point exception flags previously saved by a call to fegetexcept.

void fesetexcept (const fexcept_t *flagp, int excepts);
flagp
A pointer to the values the floating-point exception flags should have.
excepts
A mask indicating which exception flags should have their values changed.
DESCRIPTION
The fesetexcept function sets the floating-point exception flags indicated by the argument excepts to the values indicated by the argument flagp. The excepts argument may be one of the constants in Table 8-2 on page 8-6, two or more of these constants ORed together, or the constant FE_ALL_EXCEPT.

You must call fegetexcept before this function to set the flagp argument. This argument cannot be set in any other way.

EXAMPLES
fesetexcept(flagp, FE_INVALID);  /* restores the invalid flag */
fesetexcept(flagp, FE_INVALID|FE_OVERFLOW|FE_DIVBYZERO);
   /* restores the invalid, overflow, and divide-by-zero flags */
fesetexcept(flagp, FE_ALL_EXCEPT);        /* restores all flags */

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996