.\" Copyright (c) 2011, Apple Inc.
.Dd May 9, 2011
.Dt FEGETROUND 3
.Os
.Sh NAME
.Nm fegetround, fesetround
.Nd functions providing access to the floating-point rounding mode.
.Sh SYNOPSIS
.Fd #include <fenv.h>
.Fd #pragma STDC FENV_ACCESS ON
.Ft int
.Fn fegetround "void"
.Ft int
.Fn fesetround "int round"
.Sh DESCRIPTION
These functions provide control of floating-point rounding direction modes.
.Pp
The
.Fn fegetround
function gets the current rounding direction.  It returns the value of the
rounding direction macro representing the current rounding direction, or a
negative value if either there is no corresponding macro or if the rounding
direction is not determinable.
.Pp
The
.Fn fesetround
function sets the rounding direction to be that specified by the argument
.Fa round .
If the argument is not equal to the value of one of the rounding direction
macros, the rounding direction is not changed.  It returns zero if and only
if the requested rounding direction was established.
.Sh SEE ALSO
.Xr fenv 3 ,
.Xr feclearexcept 3 ,
.Xr fegetenv 3 ,
.Xr fegetexceptflag 3 ,
.Xr feholdexcept 3 ,
.Xr fesetenv 3 ,
.Xr feraiseexcept 3 ,
.Xr fesetexceptflag 3 ,
.Xr feraiseexcept 3 ,
.Xr feupdateenv 3
.Sh STANDARDS
These functions conform to ISO/IEC 9899:TC3.
