LLROUND 3CW "09 March 2006" "mathcw-1.00"
Table of contents
llroundf, llround, llroundl, llroundw, llroundq, llroundll, llrounddf, llroundd, llrounddl, llrounddll - round to nearest integer value with fixed rounding
cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]
#include <mathcw.h>
extern long long int llroundf (float x);
extern long long int llround (double x);
extern long long int llroundl (long double x);
extern long long int llroundw (__float80 x);
extern long long int llroundq (__float128 x);
extern long long int llroundll (long_long_double x);
extern long long int llrounddf (decimal_float x);
extern long long int llroundd (decimal_double x);
extern long long int llrounddl (decimal_long_double x);
extern long long int llrounddll (decimal_long_long_double x);
NB: Functions with prototypes containing underscores in type names
may be available only with certain extended compilers.
Compute the whole number nearest
x,
rounding halfway cases away from zero, regardless of the current
rounding direction.
For finite nonzero arguments, the returned value is the requisite
whole number converted to type
long long,
if that is representable. Otherwise, the returned value is the
nearest representable integer value.
If the argument is a NaN, the result is the most negative integer
representable in type
long long,
errno is set to EDOM, and in IEEE 754 arithmetic, the
invalid
exception flag is raised. If the argument is finite, but the result
is not representable in type
long long,
or the argument is +Infinity or -Infinity, the nearest such
integer value is returned, errno is set to ERANGE, and
the IEEE 754
invalid
exception flag is raised.
ceil(3CW),
floor(3CW),
llrint(3CW),
lrint(3CW),
lround(3CW),
modf(3CW),
nearbyint(3CW),
rint(3CW),
round(3CW),
trunc(3CW).