## NAME

aint, anint, irint, nint - round to integral value in
floating-point or integer format

## SYNOPSIS

cc [ __flag__ ... ] __file__ ... -lsunmath -lm [ __library__ ... ]
#include <sunmath.h>
double aint(double __x__);
double anint(double __x__);
int irint(double __x__);
int nint(double __x__);

## DESCRIPTION

aint() and anint() convert a double value into an integral
value in double format. They differ in how they choose the
result when the argument is not already an integral value.
Here an integral value means a value of a mathematical
integer, which however might be too large to fit in a par-
ticular computer's int format. All sufficiently large
values in a particular floating-point format are already
integral; in IEEE double-precision format, that means all
values >= 2**52. Zeros, infinities, and quiet NaNs are
treated as integral values by these functions, which always
preserve their argument's sign.
aint() returns the integral value between __x__ and 0, nearest
__x__. This corresponds to IEEE rounding toward zero and to the
Fortran generic intrinsic function aint.
anint() returns the nearest integral value to __x__, except
halfway cases are rounded to the integral value larger in
magnitude. This corresponds to the Fortran generic intrin-
sic function anint.
irint() converts __x__ into int format according to the current
IEEE rounding direction.
nint() converts __x__ into int format rounding to the nearest
int value, except halfway cases are rounded to the int value
larger in magnitude. This corresponds to the Fortran gen-
eric intrinsic function nint.

## SEE ALSO

**floor(3M)**