diff options
Diffstat (limited to 'manual/arith.texi')
-rw-r--r-- | manual/arith.texi | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/manual/arith.texi b/manual/arith.texi index 51d67a9..a7d6944 100644 --- a/manual/arith.texi +++ b/manual/arith.texi @@ -828,6 +828,42 @@ The function returns zero in case the operation was successful, a non-zero value otherwise. @end deftypefun +@noindent +To control for individual exceptions if raising them causes a trap to +occur, you can use the following two functions. + +@strong{Portability Note:} These functions are all GNU extensions. + +@comment fenv.h +@comment GNU +@deftypefun int feenableexcept (int @var{excepts}) +This functions enables traps for each of the exceptions as indicated by +the parameter @var{except}. The individual excepetions are described in +@ref{Examining the FPU status word}. Only the specified exceptions are +enabled, the status of the other exceptions is not changed. + +The function returns the previous enabled exceptions in case the +operation was successful, @code{-1} otherwise. +@end deftypefun + +@comment fenv.h +@comment GNU +@deftypefun int fedisableexcept (int @var{excepts}) +This functions disables traps for each of the exceptions as indicated by +the parameter @var{except}. The individual excepetions are described in +@ref{Examining the FPU status word}. Only the specified exceptions are +disabled, the status of the other exceptions is not changed. + +The function returns the previous enabled exceptions in case the +operation was successful, @code{-1} otherwise. +@end deftypefun + +@comment fenv.h +@comment GNU +@deftypefun int fegetexcept (int @var{excepts}) +The function returns a bitmask of all currently enabled exceptions. It +returns @code{-1} in case of failure. + @node Arithmetic Functions @section Arithmetic Functions |