'\" t .\" @(#)fesetprec.3m 1.5 00/01/01 SMI .TH fesetprec 3M "01/01/00" .SH NAME fesetprec, fegetprec \- control floating point rounding precision modes .SH SYNOPSIS .LP .B cc .RI "[ " "flag" " \|.\|.\|. ] " "file" " \|.\|.\|." .B -R/opt/SUNWspro/lib -L/opt/SUNWspro/lib -lm9x .RI "[ " "library" " \|.\|.\|. ]" .LP .B #include .LP .BI "int fesetprec(int " prec ); .LP .BI "int fegetprec(void);" .SH DESCRIPTION .IX "fesetprec function" "" "\fLfesetprec()\fP function" .IX "fegetprec function" "" "\fLfegetprec()\fP function" .LP The \s-1IEEE\s0 754 standard defines rounding precision modes for systems that always deliver intermediate results to destinations in extended double precision format. These modes allow such systems to deliver correctly rounded single and double precision results (in the absence of underflow and overflow) with only one rounding. .LP \f3fesetprec(\f2prec\f3)\f1 sets the current rounding precision to the precision specified by \f2prec\f1, which must be one of the following values (defined in \f3\f1): .LP .RS .PD 0 .TP 20 \s-1FE_FLTPREC\s0 round to single precision .TP \s-1FE_DBLPREC\s0 round to double precision .TP \s-1FE_LDBLPREC\s0 round to extended double precision .PD .RE .LP The default precision is \s-1FE_LDBLPREC\s0 (unless it is changed by the \f3-fprecision\f1 compiler flag). .LP \f3fegetprec(\|)\f1 returns the current rounding precision. .LP .SH "RETURN VALUES" \f3fesetprec\f1 returns a nonzero value if the requested rounding precision is established and returns zero otherwise. .SH ATTRIBUTES See .BR attributes (5) for descriptions of the following attributes: .sp .ne 10 .TS box; cbp-1 | cbp-1 l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE = Architecture Intel (see below) Availability SPROm9xs Interface Stability Stable MT-Level MT-Safe .TE .LP These functions are not available on SPARC systems because SPARC processors deliver intermediate results to destinations in single or double format as determined by each floating point instruction. .SH "SEE ALSO" .BR fegetenv (3M), .BR fesetround (3M), .BR attributes (5) .LP .I Numerical Computation Guide .SH NOTES As shown in the synopsis, the recommended way to link with libm9x using \f3cc\f1 is to specify .LP .RS .BI -R install-path "/lib -L" install-path "/lib -lm9x" .RE .LP on the command line, where \f2install-path\f1 refers to the location in which the compilers are installed (/opt/SUNWspro by default). See the \f2Numerical Computation Guide\f1 for additional information about linking with libm9x.