summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/gen/signal.31
-rw-r--r--lib/libc/sys/sigaction.23
-rw-r--r--lib/libc/sys/sigprocmask.21
-rw-r--r--lib/msun/man/math.311
-rw-r--r--share/man/man3/Makefile3
-rw-r--r--share/man/man3/fpgetround.349
6 files changed, 59 insertions, 9 deletions
diff --git a/lib/libc/gen/signal.3 b/lib/libc/gen/signal.3
index aadea35..90faadc 100644
--- a/lib/libc/gen/signal.3
+++ b/lib/libc/gen/signal.3
@@ -218,6 +218,7 @@ or
.Xr sigaltstack 2 ,
.Xr sigprocmask 2 ,
.Xr sigsuspend 2 ,
+.Xr fpsetmask 3 ,
.Xr setjmp 3 ,
.Xr tty 4
.Sh HISTORY
diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2
index 6bd3246..5037241 100644
--- a/lib/libc/sys/sigaction.2
+++ b/lib/libc/sys/sigaction.2
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" From: @(#)sigaction.2 8.2 (Berkeley) 4/3/94
-.\" $Id: sigaction.2,v 1.14 1997/09/13 19:43:24 joerg Exp $
+.\" $Id: sigaction.2,v 1.15 1998/01/02 19:22:48 alex Exp $
.\"
.Dd April 3, 1994
.Dt SIGACTION 2
@@ -404,6 +404,7 @@ flags are featuring options commonly found in other operating systems.
.Xr sigsuspend 2 ,
.Xr sigvec 2 ,
.Xr wait 2 ,
+.Xr fpsetmask 3 ,
.Xr setjmp 3 ,
.Xr siginterrupt 3 ,
.Xr sigsetops 3 ,
diff --git a/lib/libc/sys/sigprocmask.2 b/lib/libc/sys/sigprocmask.2
index af1b574..ee47585 100644
--- a/lib/libc/sys/sigprocmask.2
+++ b/lib/libc/sys/sigprocmask.2
@@ -111,6 +111,7 @@ has a value other than those listed here.
.Xr kill 2 ,
.Xr sigaction 2 ,
.Xr sigsuspend 2 ,
+.Xr fpsetmask 3 ,
.Xr sigsetops 3
.Sh STANDARDS
The
diff --git a/lib/msun/man/math.3 b/lib/msun/man/math.3
index f1fec65..1b129fc 100644
--- a/lib/msun/man/math.3
+++ b/lib/msun/man/math.3
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)math.3 6.10 (Berkeley) 5/6/91
-.\" $Id: math.3,v 1.5 1997/02/22 15:09:39 peter Exp $
+.\" $Id: math.3,v 1.6 1998/01/15 23:28:18 danny Exp $
.\"
.TH MATH 3M "May 6, 1991"
.UC 4
@@ -623,6 +623,15 @@ IEEE 754 defaults for granted; this means that a decision to
trap all divisions by zero could disrupt a code that would
otherwise get correct results despite division by zero.
.SH SEE ALSO
+\fBfpgetround\fR(3),
+\fBfpsetround\fR(3),
+\fBfpgetprec\fR(3),
+\fBfpsetprec\fR(3),
+\fBfpgetmask\fR(3),
+\fBfpsetmask\fR(3),
+\fBfpgetsticky\fR(3),
+\fBfpresetsticky\fR(3) - IEEE floating point interface
+.SH NOTES
An explanation of IEEE 754 and its proposed extension p854
was published in the IEEE magazine MICRO in August 1984 under
the title "A Proposed Radix\- and Word\-length\-independent
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.
OpenPOWER on IntegriCloud