HP-UX Floating-Point Guide
200 Appendix A
The C Math Library
C Math Library Tables
Miscellaneous Mathematical Functions (cont.)
long lround(double x); Returns x rounded to the nearest long
value, rounding halfway cases away from
zero, regardless of the current rounding
direction.
double modf(double value,
double *iptr);
Returns signed fractional part of value;
stores integral part in the location pointed
to by iptr.
double nearbyint(double x); Returns x rounded to integer-valued
double-precision number, using the
current rounding direction. Identical to
rint except that it does not raise the
inexact exception.
double remainder(double x,
double y);
Returns the remainder r = x − n*y where n
is the integer nearest the exact value of
x/y. Implements the IEEE remainder
operation.
double remquo(double x,
double y,
int *quo);
Returns the same remainder as the
remainder function, and stores the
quotient in the object pointed to by quo.
double rint(double x); Returns x rounded to integer-valued
double-precision number, using the
current rounding direction. Raises the
inexact exception.
double round(double x); Returns x rounded to integer-valued
double-precision number, rounding
halfway cases away from zero, regardless
of the current rounding direction.
double sqrt(double x); Returns nonnegative square root of x.
double trunc(double x); Returns x truncated to the integer-valued
double-precision number nearest to but no
larger in magnitude than x.
Function What It Does