Everything

rint / rintf / rintl


Rounds a floating-point number to an integer in the floating-point representation according to the current rounding direction.

[Format]

#include <math.h>

double rint(double d);

float rintf(float d);

long double rintl(long double d);

[Parameters]

d Value to be rounded to an integer in the floating-point format

[Return values]

d rounded to an integer in the floating-point format

[Remarks]

The rint function group differs from the nearbyint function group only in that the ring function group may generate "inexact" floating-point exceptions.