Intel® C++ Compiler 16.0 User and Reference Guide
Many routines in the Intel® Math Library are more highly 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:
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);
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);
Description: The fdim function returns the positive difference value, x-y (for x > y) or +0 (for x <= to y).
errno: ERANGE, for values too large
Calling interface:
double fdim(double x, double y);
long double fdiml(long double x, long double y);
float fdimf(float x, float y);
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);
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 double z);
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);
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);
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:
double fpclassify(double x);
long double fpclassifyl(long double x);
float fpclassifyf(float x);
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);
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);
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);
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);
Description: The isless function returns 1 if x is less than y. This function does not raise the invalid floating-point exception.
Calling interface:
int isless(double x, double y);
int islessl(long double x, long double y);
int islessf(float x, float y);
Description: The islessequal function returns 1 if x is less than or equal to y. This function does not raise the invalid floating-point exception.
Calling interface:
int islessequal(double x, double y);
int islessequall(long double x, long double y);
int islessequalf(float x, float y);
Description: The islessgreater function returns 1 if x is less than or greater than y. This function does not raise the invalid floating-point exception.
Calling interface:
int islessgreater(double x, double y);
int islessgreaterl(long double x, long double y);
int islessgreaterf(float x, float y);
Description: The isnan function returns a non-zero value, if and only if x has a NaN value.
Calling interface:
int isnan(double x);
int isnanl(long double x);
int isnanf(float x);
Description: The isnormal function returns a non-zero value, if and only if x is normal.
Calling interface:
int isnormal(double x);
int isnormall(long double x);
int isnormalf(float x);
Description: The isunordered function returns 1 if either x or y is a NaN. This function does not raise the invalid floating-point exception.
Calling interface:
int isunordered(double x, double y);
int isunorderedl(long double x, long double y);
int isunorderedf(float x, float y);
Description: The nextafter function returns the next representable value in the specified format after x in the direction of y.
errno: ERANGE, for overflow and underflow conditions
Calling interface:
double nextafter(double x, double y);
long double nextafterl(long double x, long double y);
float nextafterf(float x, float y);
Description: The nexttoward function returns the next representable value in the specified format after x in the direction of y. If x equals y, then the function returns y converted to the type of the function. Use the Qlong-double option on Windows* operating systems for accurate results.
errno: ERANGE, for overflow and underflow conditions
Calling interface:
double nexttoward(double x, long double y);
long double nexttowardl(long double x, long double y);
float nexttowardf(float x, long double y);