From 05ef7ce90dbb9125cdcd6ea2525efad6d1c585b7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 12 Nov 1999 17:23:30 +0000 Subject: Update. 1999-11-02 Andreas Jaeger * Versions.def: Add version GLIBC_2.2 for libm. * math/fenv.h: Add prototypes for fegetexcept, feenableexcept and fedisableexcept. * sysdeps/generic/feenablxcpt.c: Stub file. * sysdeps/generic/fedisblxcpt.c: Stub file. * sysdeps/generic/fegetexcept.c: Stub file. * sysdeps/i386/fpu/fedisblxcpt.c: New file. * sysdeps/i386/fpu/feenablxcpt.c: New file. * sysdeps/i386/fpu/fegetexcept.c: New file. * math/Makefile (libm-support): Add new files. * math/Versions: Add new functions with version GLIBC_2.2. * manual/arith.texi (Control Functions): Document fegetexcept, feenableexcept and fedisableexcept. --- manual/arith.texi | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'manual') diff --git a/manual/arith.texi b/manual/arith.texi index 51d67a99d1..a7d6944b1f 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 -- cgit v1.2.3