| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 3: Basic Library Functions Oracle Solaris 11 Information Library |
enable_extended_FILE_stdio(3C)
posix_spawnattr_getschedparam(3C)
posix_spawnattr_getschedpolicy(3C)
posix_spawnattr_getsigdefault(3C)
posix_spawnattr_getsigignore_np(3C)
posix_spawnattr_getsigmask(3C)
posix_spawnattr_setschedparam(3C)
posix_spawnattr_setschedpolicy(3C)
posix_spawnattr_setsigdefault(3C)
posix_spawnattr_setsigignore_np(3C)
posix_spawnattr_setsigmask(3C)
posix_spawn_file_actions_addclose(3C)
posix_spawn_file_actions_addclosefrom_np(3C)
posix_spawn_file_actions_adddup2(3C)
posix_spawn_file_actions_addopen(3C)
posix_spawn_file_actions_destroy(3C)
posix_spawn_file_actions_init(3C)
pthread_attr_getdetachstate(3C)
pthread_attr_getinheritsched(3C)
pthread_attr_getschedparam(3C)
pthread_attr_getschedpolicy(3C)
pthread_attr_setdetachstate(3C)
pthread_attr_setinheritsched(3C)
pthread_attr_setschedparam(3C)
pthread_attr_setschedpolicy(3C)
pthread_barrierattr_destroy(3C)
pthread_barrierattr_getpshared(3C)
pthread_barrierattr_setpshared(3C)
pthread_condattr_getpshared(3C)
pthread_condattr_setpshared(3C)
pthread_cond_reltimedwait_np(3C)
pthread_key_create_once_np(3C)
pthread_mutexattr_getprioceiling(3C)
pthread_mutexattr_getprotocol(3C)
pthread_mutexattr_getpshared(3C)
pthread_mutexattr_getrobust(3C)
pthread_mutexattr_setprioceiling(3C)
pthread_mutexattr_setprotocol(3C)
pthread_mutexattr_setpshared(3C)
pthread_mutexattr_setrobust(3C)
pthread_mutex_getprioceiling(3C)
pthread_mutex_reltimedlock_np(3C)
pthread_mutex_setprioceiling(3C)
pthread_rwlockattr_destroy(3C)
pthread_rwlockattr_getpshared(3C)
pthread_rwlockattr_setpshared(3C)
pthread_rwlock_reltimedrdlock_np(3C)
pthread_rwlock_reltimedwrlock_np(3C)
pthread_rwlock_timedrdlock(3C)
pthread_rwlock_timedwrlock(3C)
rctlblk_get_enforced_value(3C)
- IEEE floating-point environment control
#include <ieeefp.h>fp_rndfpgetround(void);
fp_rndfpsetround(fp_rndrnd_dir);
fp_exceptfpgetmask(void);
fp_exceptfpsetmask(fp_exceptmask);
fp_exceptfpgetsticky(void);
fp_exceptfpsetsticky(fp_exceptsticky);
There are five floating-point exceptions:
divide-by-zero,
overflow,
underflow,
imprecise (inexact) result, and
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 anyof these exceptions, as well as change the rounding mode for floating-pointoperations.
Themask argument is formed by the logical OR operation of thefollowing 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 tofpsetround and returnedbyfpgetround().
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 alltraps disabled.
Thefpsetsticky() function modifies all sticky flags. Thefpsetmask() function changes allmask bits. Thefpsetmask() function clears the sticky bit corresponding to anyexception being enabled.
Thefpgetround() function returns the current rounding mode.
Thefpsetround() function sets the rounding mode and returns the previous roundingmode.
Thefpgetmask() function returns the current exception masks.
Thefpsetmask() function sets the exception masks and returns the previous setting.
Thefpgetsticky() function returns the current exception sticky flags.
Thefpsetsticky() function sets (clears) the exception sticky flags and returnsthe previous setting.
The C programming language requires truncation (round to zero) for floating pointto integral conversions. The current rounding mode has no effect on theseconversions.
The sticky bit must be cleared to recover from the trap and proceed. If the sticky bit is not cleared before thenext trap occurs, a wrong exception type may be signaled.
Individual bits may be examined using the constants defined in<ieeefp.h>.
Seeattributes(5) for descriptions of the following attributes:
|
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |