fpsetsticky man page on Solaris

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
Solaris logo
[printable version]

fpgetround(3C)		 Standard C Library Functions		fpgetround(3C)

NAME
       fpgetround,  fpsetround, fpgetmask, fpsetmask, fpgetsticky, fpsetsticky
       - IEEE floating-point environment control

SYNOPSIS
       #include <ieeefp.h>

       fp_rnd fpgetround(void);

       fp_rnd fpsetround(fp_rnd rnd_dir);

       fp_except fpgetmask(void);

       fp_except fpsetmask(fp_except mask);

       fp_except fpgetsticky(void);

       fp_except fpsetsticky(fp_except sticky);

DESCRIPTION
       There are five floating-point exceptions:

	   o	  divide-by-zero,

	   o	  overflow,

	   o	  underflow,

	   o	  imprecise (inexact) result, and

	   o	  invalid operation.

       When a floating-point exception occurs, the corresponding sticky bit is
       set  (1),  and  if  the	mask bit is enabled (1), the trap takes place.
       These routines let the user change the behavior on occurrence of any of
       these  exceptions,  as  well  as change the rounding mode for floating-
       point operations.

       The mask argument is formed by the logical OR operation of the  follow‐
       ing floating-point exception masks:

	 FP_X_INV	/* invalid operation exception */
	 FP_X_OFL	/* overflow exception */
	 FP_X_UFL	/* underflow exception */
	 FP_X_DZ	/* divide-by-zero exception */
	 FP_X_IMP	/* imprecise (loss of precision) */

       The  following  floating-point rounding modes are passed to  fpsetround
       and returned by	fpgetround().

	 FP_RN	     /* round to nearest representative number */
	 FP_RP	     /* round to plus infinity */
	 FP_RM	     /* round to minus infinity */
	 FP_RZ	     /* round to zero (truncate) */

       The default environment is rounding mode set to nearest (FP_RN) and all
       traps disabled.

       The  fpsetsticky()  function modifies all sticky flags. The fpsetmask()
       function changes all mask bits. The  fpsetmask()	 function  clears  the
       sticky bit corresponding to any exception being enabled.

RETURN VALUES
       The fpgetround() function returns the current rounding mode.

       The fpsetround() function sets the rounding mode and returns the previ‐
       ous rounding mode.

       The fpgetmask() function returns the current exception masks.

       The fpsetmask() function sets the exception masks and returns the  pre‐
       vious setting.

       The fpgetsticky() function returns the current exception sticky flags.

       The fpsetsticky() function sets (clears) the exception sticky flags and
       returns the previous setting.

USAGE
       The C programming language requires  truncation	(round	to  zero)  for
       floating	 point	to integral conversions. The current rounding mode has
       no effect on these conversions.

       The sticky bit must be cleared to recover from the trap	 and  proceed.
       If  the	sticky bit is not cleared before the next trap occurs, a wrong
       exception type may be signaled.

       Individual  bits	 may  be  examined  using  the	constants  defined  in
       <ieeefp.h>.

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌─────────────────────────────┬─────────────────────────────┐
       │      ATTRIBUTE TYPE	     │	    ATTRIBUTE VALUE	   │
       ├─────────────────────────────┼─────────────────────────────┤
       │MT-Level		     │MT-Safe			   │
       └─────────────────────────────┴─────────────────────────────┘

SEE ALSO
       isnand(3C), attributes(5)

SunOS 5.10			  29 Dec 1996			fpgetround(3C)
[top]

List of man pages available for Solaris

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net