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 | |
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')
-rw-r--r-- | share/man/man3/Makefile | 3 | ||||
-rw-r--r-- | share/man/man3/fpgetround.3 | 49 |
2 files changed, 45 insertions, 7 deletions
diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile index de09b2e..0120c42 100644 --- a/share/man/man3/Makefile +++ b/share/man/man3/Makefile @@ -1,5 +1,5 @@ # @(#)Makefile 8.2 (Berkeley) 12/13/93 -# $Id$ +# $Id: Makefile,v 1.12 1997/02/22 13:24:13 peter Exp $ MAN3= assert.3 bitstring.3 end.3 fpgetround.3 intro.3 pthread.3 queue.3 \ stdarg.3 sysexits.3 @@ -11,6 +11,7 @@ MLINKS+=end.3 edata.3 end.3 etext.3 MLINKS+=fpgetround.3 fpsetround.3 fpgetround.3 fpgetmask.3 MLINKS+=fpgetround.3 fpsetmask.3 fpgetround.3 fpgetsticky.3 MLINKS+=fpgetround.3 fpsetsticky.3 fpgetround.3 fpresetsticky.3 +MLINKS+=fpgetround.3 fpsetprec.3 fpgetround.3 fpgetprec.3 MLINKS+=queue.3 SLIST_ENTRY.3 queue.3 SLIST_HEAD.3 queue.3 SLIST_INIT.3 MLINKS+=queue.3 SLIST_INSERT_AFTER.3 queue.3 SLIST_INSERT_HEAD.3 MLINKS+=queue.3 SLIST_REMOVE_HEAD.3 queue.3 SLIST_REMOVE.3 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. |