Everything

nearbyint / nearbyintf / nearbyintl


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

[Format]

#include <math.h>

double nearbyint(double d);

float nearbyintf(float d);

long double nearbyintl(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 nearbyint function group does not generate "inexact" floating-point exceptions.