MicrOS
lroundl.c File Reference
#include "../math.h"

Functions

long int lroundl (long double x)
 Round to nearest and cast to long integer. More...
 

Function Documentation

◆ lroundl()

long int lroundl ( long double  x)

Round to nearest and cast to long integer.

The lroundl and llround functions round their argument to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding direction. If the rounded value is outside the range of the return type, the numeric result is unspecified and a domain error or range error may occur.

Parameters
xValue to round.
Returns
The lroundl and llround functions return the rounded integer value.