MirOS Manual: fpgetmask(3), fpgetround(3), fpgetsticky(3), fpsetmask(3), fpsetround(3), fpsetsticky(3)

FPGETMASK(3)               BSD Programmer's Manual                FPGETMASK(3)

NAME

     fpgetmask, fpgetround, fpgetsticky, fpsetmask, fpsetround, fpsetsticky -
     IEEE FP mode control

SYNOPSIS

     #include <ieeefp.h>

     fp_except
     fpgetmask(void);

     fp_rnd
     fpgetround(void);

     fp_except
     fpgetsticky(void);

     fp_except
     fpsetmask(fp_except mask);

     fp_rnd
     fpsetround(fp_rnd rnd_dir);

     fp_except
     fpsetsticky(fp_except sticky);

DESCRIPTION

     A rounding mode is one of FP_RZ, FP_RM, FP_RN, or FP_RP, for rounding to-
     wards zero, rounding (Minus infinity) down, rounding to nearest, and
     rounding (Plus infinity) up. The default mode is FP_RN.

     An fp_except value is a bitmask specifying an exception type and contain-
     ing any of the values listed below.

           FP_X_INV      Invalid Operation
           FP_X_DZ       Division by zero
           FP_X_OFL      Overflow
           FP_X_UFL      Underflow
           FP_X_IMP      Imprecision (inexact)
           FP_X_IOV      Integer Overflow

     The fpsetmask() function will cause future operations with the specified
     result status to raise the SIGFPE exception. The fpsetround() function
     will cause future operations to use the specified dynamic mode.

     Note:   On some architectures, instructions can optionally specify static
             rounding modes and exception enables that will supersede the
             specified dynamic mode. On other architectures, these features
             may not be fully supported.

     The fpsetsticky() function will set or clear the specified exception his-
     tory bits.

RETURN VALUES

     The fpgetround() and fpsetround() functions return the (previous) round-
     ing mode. The fpgetmask(), fpsetmask(), fpgetsticky(), and fpsetsticky()
     functions return the (previous) exception mask and exception history
     bits.

SEE ALSO

     sigaction(2)

MirOS BSD #10-current           April 29, 1999                               1

Generated on 2015-07-19 22:36:15 by $MirOS: src/scripts/roff2htm,v 1.80 2015/01/02 13:54:19 tg Exp $

These manual pages and other documentation are copyrighted by their respective writers; their source is available at our CVSweb, AnonCVS, and other mirrors. The rest is Copyright © 2002–2015 The MirOS Project, Germany.
This product includes material provided by Thorsten Glaser.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.