Developer Guide and Reference

Contents

Miscellaneous 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 miscellaneous functions:

copysign

Description:
The
copysign
function returns the value with the magnitude of
x
and the sign of
y
.
Calling interface:
double copysign(double x, double y);
long double copysignl(long double x, long double y);
float copysignf(float x, float y);

fabs

Description:
The
fabs
function returns the absolute value of
x
.
Calling interface:
double fabs(double x);
long double fabsl(long double x);
float fabsf(float x);

fdim

Description:
The
fdim
function returns the positive difference value,
x-y
(for
x > y
) or +0 (for
x <= to y
).
errno
: ERANGE, for overflow conditions
Calling interface:
double fdim(double x, double y);
long double fdiml(long double x, long double y);
float fdimf(float x, float y);

finite

Description:
The
finite
function returns 1 if
x
is not a
NaN
or +/- infinity. Otherwise
0
is returned.
Calling interface:
int finite(double x);
int finitel(long double x);
int finitef(float x);

fma

Description:
The
fma
functions return
(x*y)+z
.
Calling interface:
double fma(double x, double y, double z);
long double fmal(long double x, long double y, long double z);
float fmaf(float x, float y, float z);

fmax

Description:
The
fmax
function returns the maximum numeric value of its arguments.
Calling interface:
double fmax(double x, double y);
long double fmaxl(long double x, long double y);
float fmaxf(float x, float y);

fmin

Description:
The
fmin
function returns the minimum numeric value of its arguments.
Calling interface:
double fmin(double x, double y);
long double fminl(long double x, long double y);
float fminf(float x, float y);

fpclassify

Description:
The
fpclassify
function returns the value of the number classification macro appropriate to the value of its argument.
Return Value
0 (NaN)
1 (Infinity)
2 (Zero)
3 (Subnormal)
4 (Finite)
Calling interface:
int fpclassify(double x);
int fpclassifyl(long double x);
int fpclassifyf(float x);

isfinite

Description:
The
isfinite
function returns
1
if
x
is not a NaN or +/- infinity. Otherwise
0
is returned.
Calling interface:
int isfinite(double x);
int isfinitel(long double x);
int isfinitef(float x);

isgreater

Description:
The
isgreater
function returns
1
if
x
is greater than
y
. This function does not raise the invalid floating-point exception.
Calling interface:
int isgreater(double x, double y);
int isgreaterl(long double x, long double y);
int isgreaterf(float x, float y);

isgreaterequal

Description:
The
isgreaterequal
function returns
1
if
x
is greater than or equal to
y
. This function does not raise the invalid floating-point exception.
Calling interface:
int isgreaterequal(double x, double y);
int isgreaterequall(long double x, long double y);
int isgreaterequalf(float x, float y);

isinf

Description:
The
isinf
function returns a non-zero value if and only if its argument has an infinite value.
Calling interface:
int isinf(double x);
int isinfl(long double x);
int isinff(float x);

isless

Description:
The
isless
function returns
1
if
x
is less than
y
. This function does not raise the invalid floating-point exception.
Calling