diff options
author | das <das@FreeBSD.org> | 2005-03-16 19:03:46 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2005-03-16 19:03:46 +0000 |
commit | 6448887f3bd81c49f6bad7a48dc2c5b80eab84cb (patch) | |
tree | ed1345d1aaf08f9b2af1cfc6cc10e15b82d917d1 /lib/msun/man/fenv.3 | |
parent | f472dda708da18436fce04e1b640051e98b0bcf9 (diff) | |
download | FreeBSD-src-6448887f3bd81c49f6bad7a48dc2c5b80eab84cb.zip FreeBSD-src-6448887f3bd81c49f6bad7a48dc2c5b80eab84cb.tar.gz |
Replace fegetmask() and fesetmask() with feenableexcept(),
fedisableexcept(), and fegetexcept(). These two sets of routines
provide the same functionality. I implemented the former as an
undocumented internal interface to make the regression test easier to
write. However, fe(enable|disable|get)except() is already part of
glibc, and I would like to avoid gratuitous differences. The only
major flaw in the glibc API is that there's no good way to report
errors on processors that don't support all the unmasked exceptions.
Diffstat (limited to 'lib/msun/man/fenv.3')
-rw-r--r-- | lib/msun/man/fenv.3 | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/lib/msun/man/fenv.3 b/lib/msun/man/fenv.3 index 7c6de1f..1ae0177 100644 --- a/lib/msun/man/fenv.3 +++ b/lib/msun/man/fenv.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 8, 2004 +.Dd March 16, 2005 .Dt FENV 3 .Os .Sh NAME @@ -38,7 +38,10 @@ .Nm fegetenv , .Nm feholdexcept , .Nm fesetenv , -.Nm feupdateenv +.Nm feupdateenv , +.Nm feenableexcept , +.Nm fedisableexcept , +.Nm fegetexcept .Nd floating-point environment control .Sh LIBRARY .Lb libm @@ -67,6 +70,12 @@ .Fn fesetenv "const fenv_t *envp" .Ft int .Fn feupdateenv "const fenv_t *envp" +.Ft int +.Fn feenableexcept "int excepts" +.Ft int +.Fn fedisableexcept "int excepts" +.Ft int +.Fn fegetexcept "void" .Sh DESCRIPTION The .In fenv.h @@ -115,6 +124,17 @@ and .Fn fetestexcept functions to clear, save, raise, restore, and examine the processor's floating-point exception flags, respectively. +.Pp +Exceptions may be +.Em unmasked +with +.Fn feenableexcept +and masked with +.Fn fedisableexcept . +Unmasked exceptions cause a trap when they are produced, and +all exceptions are masked by default. +The current mask can be tested with +.Fn fegetexcept . .Ss Rounding Modes .St -ieee754 specifies four rounding modes. @@ -219,7 +239,10 @@ double sqrt(double n) { .Sh SEE ALSO .Xr cc 1 , .Xr feclearexcept 3 , +.Xr fedisableexcept 3 , +.Xr feenableexcept 3 , .Xr fegetenv 3 , +.Xr fegetexcept 3 , .Xr fegetexceptflag 3 , .Xr fegetround 3 , .Xr feholdexcept 3 , @@ -229,19 +252,19 @@ double sqrt(double n) { .Xr fesetround 3 , .Xr fetestexcept 3 , .Xr feupdateenv 3 , -.Xr fpgetmask 3 , .Xr fpgetprec 3 , -.Xr fpgetround 3 , -.Xr fpgetsticky 3 , -.Xr fpresetsticky 3 , -.Xr fpsetmask 3 , -.Xr fpsetprec 3 , -.Xr fpsetround 3 +.Xr fpsetprec 3 .Sh STANDARDS Except as noted below, .In fenv.h conforms to .St -isoC-99 . +The +.Fn feenableexcept , +.Fn fedisableexcept , +and +.Fn fegetexcept +routines are extensions. .Sh HISTORY The .In fenv.h |