'\" te .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH FESETPREC 3M "Jul 12, 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(7) for descriptions of the following attributes: .sp .sp .TS tab( ) box; lw(2.75i) lw(2.75i) lw(2.75i) lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE Architecture Intel (see below) Availability SUNWlibms Interface Stability Stable MT-Level MT-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 .BR fegetenv (3M), .BR fesetround (3M), .BR attributes (7) .sp .LP \fINumerical\fR \fIComputation\fR \fIGuide\fR