From 13d93081ff4e100d5bf3c99d72fba5e67309db19 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Thu, 9 Apr 2009 11:24:42 +0200 Subject: [PATCH] fpgetround(3): Sync manual page with FreeBSD. --- share/man/man3/fpgetround.3 | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/share/man/man3/fpgetround.3 b/share/man/man3/fpgetround.3 index beda9cd228..0db4d04805 100644 --- a/share/man/man3/fpgetround.3 +++ b/share/man/man3/fpgetround.3 @@ -30,10 +30,10 @@ .\" SUCH DAMAGE. .\" .\" @(#)fpgetround.3 1.0 (Berkeley) 9/23/93 -.\" $FreeBSD: src/share/man/man3/fpgetround.3,v 1.9.2.2 2001/12/17 11:30:11 ru Exp $ +.\" $FreeBSD: src/share/man/man3/fpgetround.3,v 1.15 2005/07/15 17:35:25 hrs Exp $ .\" $DragonFly: src/share/man/man3/fpgetround.3,v 1.4 2008/05/02 02:05:05 swildner Exp $ .\" -.Dd August 23, 1993 +.Dd April 9, 2009 .Dt FPGETROUND 3 .Os .Sh NAME @@ -93,12 +93,17 @@ typedef enum { .Ft fp_except_t .Fn fpresetsticky "fp_except_t sticky" .Sh DESCRIPTION +The routines described herein are deprecated. +New code should use the functionality provided by +.Xr fenv 3 . +.Pp When a floating point exception is detected, the exception sticky flag is set and the exception mask is tested. -If the mask is set, then a trap -occurs. These routines allow both setting the floating point exception -masks, and resetting the exception sticky flags after an exception is -detected. In addition, they allow setting the floating point rounding mode +If the mask is set, then a trap occurs. +These routines allow both setting the floating point exception +masks, and resetting the exception sticky flags after an exception is +detected. +In addition, they allow setting the floating point rounding mode and precision. .Pp The @@ -154,11 +159,20 @@ c = a / b; fpresetsticky(FP_X_DZ); fpsetmask(FP_X_DZ); .Ed +.Sh IMPLEMENTATION NOTES +The +.Fn fpgetprec +and +.Fn fpsetprec +functions provide functionality unavailable on many platforms. +At present, they are implemented only on the i386 and amd64 platforms. .Sh SEE ALSO +.Xr fenv 3 , .Xr isnan 3 -.Sh CAVEAT +.Sh CAVEATS After a floating point exception and before a mask is set, the sticky -flags must be reset. If another exception occurs before the sticky +flags must be reset. +If another exception occurs before the sticky flags are reset, then a wrong exception type may be signaled. .Sh HISTORY These routines are based on SysV/386 routines of the same name. -- 2.41.0