diff options
author | jlemon <jlemon@FreeBSD.org> | 1998-02-04 22:30:20 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 1998-02-04 22:30:20 +0000 |
commit | 856becd843ef5a7a14eeb66b3159728409ccdbfc (patch) | |
tree | ceae2710918fb55748526ce5f5f948076ce5e985 /share/man/man3/fpgetround.3 | |
parent | cd0b25e001ac2e2d21ff45808806818f6b28ffe7 (diff) | |
download | FreeBSD-src-856becd843ef5a7a14eeb66b3159728409ccdbfc.zip FreeBSD-src-856becd843ef5a7a14eeb66b3159728409ccdbfc.tar.gz |
Document the fpgetprec/fpsetprec functions in their man page.
Add cross-references to the elusive fpsetmask() function to various other
man pages.
Reviewed by: bde
Diffstat (limited to 'share/man/man3/fpgetround.3')
-rw-r--r-- | share/man/man3/fpgetround.3 | 49 |
1 files changed, 43 insertions, 6 deletions
diff --git a/share/man/man3/fpgetround.3 b/share/man/man3/fpgetround.3 index b0bc280..d60ef1b 100644 --- a/share/man/man3/fpgetround.3 +++ b/share/man/man3/fpgetround.3 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)fpgetround.3 1.0 (Berkeley) 9/23/93 -.\" $Id: fpgetround.3,v 1.4 1997/03/19 20:42:18 bde Exp $ +.\" $Id: fpgetround.3,v 1.5 1997/04/13 14:19:59 bde Exp $ .\" .Dd August 23, 1993 .Dt FPGETROUND 3 @@ -38,6 +38,8 @@ .Sh NAME .Nm fpgetround , .Nm fpsetround , +.Nm fpsetprec , +.Nm fpgetprec , .Nm fpgetmask , .Nm fpsetmask , .Nm fpgetsticky , @@ -47,16 +49,16 @@ .Fd #include <floatingpoint.h> .Ft typedef enum { .br -.Fa FP_RN, +.Fa FP_RN, .Li /* round to nearest */ .br -.Fa FP_RM, +.Fa FP_RM, .Li /* round to minus infinity */ .br -.Fa FP_RP, +.Fa FP_RP, .Li /* round to plus infinity */ .br -.Fa FP_RZ, +.Fa FP_RZ, .Li /* truncate */ .br .Ft } fp_rnd_t; @@ -65,6 +67,29 @@ .Fn fpgetround void .Ft fp_rnd_t .Fn fpsetround "fp_rnd_t direction" +.Pp +.nr fZ 0 +.Ft typedef enum { +.br +.Fa FP_PS, +.Li /* 24 bit (single-precision) */ +.br +.Fa FP_PRS, +.Li /* reserved */ +.br +.Fa FP_PD, +.Li /* 53 bit (double-precision) */ +.br +.Fa FP_PE, +.Li /* 64 bit (extended-precision) */ +.br +.Ft } fp_prec_t; +.Pp +.Ft fp_prec_t +.Fn fpgetprec void +.Ft fp_prec_t +.Fn fpsetprec "fp_prec_t precision" +.Pp .Fd #define fp_except_t int .Fd #define FP_X_INV 0x01 /* invalid */ .Fd #define FP_X_OFL 0x08 /* overflow */ @@ -85,7 +110,8 @@ 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. +detected. In addition, they allow setting the floating point rounding mode +and precision. .Pp The .Fn fpgetround @@ -99,6 +125,17 @@ sets the floating point rounding mode and returns the previous mode. .Pp The +.Fn fpgetprec +function +returns the current floating point precision. +.Pp +The +.Fn fpsetprec +function +sets the floating point precision and returns +the previous precision. +.Pp +The .Fn fpgetmask function returns the current floating point exception masks. |