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

Functions

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

Function Documentation

◆ llround()

long long int llround ( double  x)

Round to nearest and cast to long long integer.

The lround 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 lround and llround functions return the rounded integer value.