'\" te .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. .TH fesetprec 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" .SH NAME fesetprec, fegetprec \- control floating point rounding precision modes .SH SYNOPSIS .LP .nf c99 [ \fIflag\fR... ] \fIfile\fR... -lm [ \fIlibrary\fR... ] #include \fBint\fR \fBfesetprec\fR(\fBint\fR \fIprec\fR); .fi .LP .nf \fBint\fR \fBfegetprec\fR(\fBvoid\fR); .fi .SH DESCRIPTION .sp .LP The IEEE 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. .sp .LP The \fBfesetprec()\fR function sets the current rounding precision to the precision specified by \fIprec\fR, which must be one of the following values defined in <\fBfenv.h\fR>: .sp .ne 2 .mk .na \fB\fBFE_FLTPREC\fR\fR .ad .RS 15n .rt round to single precision .RE .sp .ne 2 .mk .na \fB\fBFE_DBLPREC\fR\fR .ad .RS 15n .rt round to double precision .RE .sp .ne 2 .mk .na \fB\fBFE_LDBLPREC\fR\fR .ad .RS 15n .rt round to extended double precision .RE .sp .LP The default rounding precision when a program starts is \fBFE_LDBLPREC\fR. .sp .LP The \fBfegetprec()\fR function returns the current rounding precision. .SH RETURN VALUES .sp .LP The \fBfesetprec()\fR function returns a non-zero value if the requested rounding precision is established and 0 otherwise. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; lw(2.75i) lw(2.75i) lw(2.75i) lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE ArchitectureIntel (see below) Availabilitysystem/library/math Interface StabilityCommitted MT-LevelMT-Safe .TE .sp .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 .sp .LP \fBfegetenv\fR(3M), \fBfesetround\fR(3M), \fBattributes\fR(5) .sp .LP \fINumerical\fR \fIComputation\fR \fIGuide\fR