rint(), rintf()

round to integral value in floating-point format 

Function


SYNOPSIS

#include <math.h>

double rint(double x)

float rintf(float x)


DESCRIPTION

The rint() function returns the integral value (represented as a double precision number) nearest to x according to the prevailing rounding mode.

The rintf() function is a single-precision version of rint().


PARAMETERS

x 

Is the floating point value to round.


RETURN VALUES

The rint() function returns the integral value nearest to x.

If x is +Infinity or -Infinity, rint() returns x.

If x is NaN, NaN is returned.


CONFORMANCE

rint(): UNIX 98

rintf(): MKS Toolkit UNIX APIs extension


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
abs(), ceil(), fabs(), floor(), isnan(), math()


MKS Toolkit 9.3 Documentation Build 6.