Search:
Reference
<cfenv>
FE_TONEAREST
macro
<cfenv>
FE_TONEAREST
int
To-nearest rounding direction mode
This macro expands to a value of type
int
that identifies the
to-nearest
rounding direction mode for functions
fegetround
and
fesetround
.
Rounding
x
to-nearest
selects the possible value that is nearest to
x
, with halfway cases rounded away from zero.
Possible
rounding direction modes
are:
macro value
description
FE_DOWNWARD
Round downward.
FE_TONEAREST
Round to nearest.
FE_TOWARDZERO
Round toward zero.
FE_UPWARD
Round upward.
See also
FE_DOWNWARD
Downward rounding direction mode
(macro )
FE_TOWARDZERO
Toward-zero rounding direction mode
(macro )
FE_UPWARD
Upward rounding direction mode
(macro )
fegetround
Get rounding direction mode
(function )
fesetround
Set rounding direction mode
(function )
C++
Information
Tutorials
Reference
Articles
Forum
Reference
C library:
<cassert> (assert.h)
<cctype> (ctype.h)
<cerrno> (errno.h)
<cfenv> (fenv.h)
<cfloat> (float.h)
<cinttypes> (inttypes.h)
<ciso646> (iso646.h)
<climits> (limits.h)
<clocale> (locale.h)
<cmath> (math.h)
<csetjmp> (setjmp.h)
<csignal> (signal.h)
<cstdarg> (stdarg.h)
<cstdbool> (stdbool.h)
<cstddef> (stddef.h)
<cstdint> (stdint.h)
<cstdio> (stdio.h)
<cstdlib> (stdlib.h)
<cstring> (string.h)
<ctgmath> (tgmath.h)
<ctime> (time.h)
<cuchar> (uchar.h)
<cwchar> (wchar.h)
<cwctype> (wctype.h)
Containers:
<array>
<deque>
<forward_list>
<list>
<map>
<queue>
<set>
<stack>
<unordered_map>
<unordered_set>
<vector>
Input/Output:
<fstream>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<ostream>
<sstream>
<streambuf>
Multi-threading:
<atomic>
<condition_variable>
<future>
<mutex>
<thread>
Other:
<algorithm>
<bitset>
<chrono>
<codecvt>
<complex>
<exception>
<functional>
<initializer_list>
<iterator>
<limits>
<locale>
<memory>
<new>
<numeric>
<random>
<ratio>
<regex>
<stdexcept>
<string>
<system_error>
<tuple>
<typeindex>
<typeinfo>
<type_traits>
<utility>
<valarray>
<cfenv> (fenv.h)
functions:
feclearexcept
fegetenv
fegetexceptflag
fegetround
feholdexcept
feraiseexcept
fesetenv
fesetexceptflag
fesetround
fetestexcept
feupdateenv
types:
fenv_t
fexcept_t
pragma:
FENV_ACCESS
macro constants:
FE_ALL_EXCEPT
FE_DFL_ENV
FE_DIVBYZERO
FE_DOWNWARD
FE_INEXACT
FE_INVALID
FE_OVERFLOW
FE_TONEAREST
FE_TOWARDZERO
FE_UNDERFLOW
FE_UPWARD