nearbyint(), nearbyintf(), nearbyintl()

Return a rounded integer value

Synopsis:

#include <math.h>

double nearbyint( double x);

float nearbyintf( float x);

long double nearbyintl( long double x);

Arguments:

x
The number that you want to round.

Library:

libm

Use the -l m option to qcc to link against this library.

Description:

The nearbyint(), nearbyintf(), and nearbyintl() functions round their argument to an integer value in floating-point format, using the current rounding direction and without raising the inexact floating-point exception.

Returns:

The rounded integer value, with the same sign as x.

Classification:

ANSI, POSIX 1003.1

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes