*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> fpgetmask (3)              
Title
Content
Arch
Section
 

FPGETMASK(3)

Contents


NAME    [Toc]    [Back]

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

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #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    [Toc]    [Back]

     A rounding mode is one of FP_RZ, FP_RM, FP_RN, or FP_RP, for rounding
     towards 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 containing
 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 history
 bits.

RETURN VALUES    [Toc]    [Back]

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

SEE ALSO    [Toc]    [Back]

      
      
     sigaction(2)

BSD                             April 29, 1999                             BSD
[ Back ]
 Similar pages
Name OS Title
feedback IRIX control feedback mode
endfeedback IRIX control feedback mode
doublebuffer IRIX sets the display mode to double buffer mode
cmode IRIX sets color map mode as the current mode.
unicode_stop Linux put the console out of unicode mode (ie. in 8-bit mode).
logbf FreeBSD IEEE test functions
scalb FreeBSD IEEE test functions
scalbf FreeBSD IEEE test functions
finitef FreeBSD functions for IEEE arithmetic
significand FreeBSD IEEE test functions
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service