Manual Page Result
0
Command: write_rnd | Section: 3 | Source: Digital UNIX | File: write_rnd.3.gz
write_rnd(3) Library Functions Manual write_rnd(3)
NAME
write_rnd, read_rnd - Sets and returns IEEE dynamic rounding mode for
floating-point operations
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <float.h>
unsigned int write_rnd(
unsigned int rnd);
unsigned int read_rnd();
DESCRIPTION
The write_rnd function sets the dynamic rounding mode in the floating-
point control register (fpcr) for IEEE floating-point operations and
returns the previous dynamic rounding mode. Dynamic rounding mode for
IEEE floating-point operations is enabled for code generated by the C
compiler by specifying -fprm d to cc(1), and by using the d floating-
point instruction operator in assembly language code.
Specify rnd as one of the following constants defined in float.h
tab(@); lfHB lfHB l l. _
Constant@Meaning
_
FP_RND_RZ@T{ Round toward zero (chopped rounding) T}
FP_RND_RN@T{ Round toward nearest (normal rounding) T}
FP_RND_RP@T{ Round toward plus infinity T}
FP_RND_RM@T{ Round toward minus infinity T}
_
The read_rnd function returns the current dynamic rounding mode for
floating-point operations.
RETURN VALUES
The write_rnd function returns the previous IEEE floating-point round-
ing mode. The read_rnd function returns the current IEEE floating-
point rounding mode.
RELATED INFORMATION
Commands: cc(1).
Files: float.h.
Assembly Language Programmer's Guide.
Alpha Architecture Reference Manual.
IEEE Standard for Binary Floating-Point Arithmetic delim off
write_rnd(3)