Developer Guide and Reference

Contents

Nearest Integer Functions

Many routines in the Intel® Math Library are more optimized for Intel® microprocessors than for non-Intel microprocessors.
The
mathimf.h
header file includes prototypes for Intel® Math Library functions.
The Intel® Math Library supports the following nearest integer functions:

ceil

Description:
The
ceil
function returns the smallest integral value not less than
x
as a floating-point number.
Calling interface:
double ceil(double x);
long double ceill(long double x);
float ceilf(float x);

floor

Description:
The
floor
function returns the largest integral value not greater than
x
as a floating-point value.
Calling interface:
double floor(double x);
long double floorl(long double x);
float floorf(float x);

llrint

Description:
The
llrint
function returns the rounded integer value (according to the current rounding direction) as a
long long int
.
errno
: ERANGE, for values too large
Calling interface:
long long int llrint(double x);
long long int llrintl(long double x);
long long int llrintf(float x);

llround

Description:
The
llround
function returns the rounded integer value as a
long long int
.
errno
: ERANGE, for values too large
Calling interface:
long long int llround(double x);
long long int llroundl(long double x);
long long int llroundf(float x);

lrint

Description:
The
lrint
function returns the rounded integer value (according to the current rounding direction) as a
long