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 exponential functions:

cbrt

Description: The cbrt function returns the cube root of x.

Calling interface:
double cbrt(double x);
long double cbrtl(long double x);
float cbrtf(float x);

exp

Description: The exp function returns e raised to the x power, ex.

errno: ERANGE, for underflow and overflow conditions

Calling interface:
double exp(double x);
long double expl(long double x);
float expf(float x);

exp10

Description: The exp10 function returns 10 raised to the x power, 10x.

errno: ERANGE, for underflow and overflow conditions

Calling interface:
double exp10(double x);
long double exp10l(long double x);
float exp10f(float x);

exp2

Description: The exp2 function returns 2 raised to the x power, 2x.

errno: ERANGE, for underflow and overflow conditions

Calling interface:
double exp2(double x);
long double exp2l(long double x);
float exp2f(float x);

expm1

Description: The expm1 function returns e raised to the x power, minus 1, ex -1.

errno: ERANGE, for overflow conditions

Calling interface:
double expm1(double x);
long double expm1l(long double x);
float expm1f(float x);

frexp

Description: The frexp function converts a floating-point number x into signed normalized fraction in [1/2, 1) multiplied by an integral power of two. The signed normalized fraction is returned, and the integer exponent stored at location exp.

Calling interface:
double frexp(double x, int *exp);
long double frexpl(long double x, int *exp);
float frexpf(float x, int *exp);

hypot

Description: The hypot function returns the square root of (x2 + y2).

errno: ERANGE, for overflow conditions

Calling interface:
double hypot(double x, double y);
long double hypotl(long double x, long double y);
float hypotf(float x, float y);

ilogb

Description: The ilogb function returns the exponent of x base two as a signed int value.

errno: ERANGE, for x = 0

Calling interface:
int ilogb(double x);
int ilogbl(long double x);
int ilogbf(float x);

invsqrt

Description: The invsqrt function returns the inverse square root.

Calling interface:
double invsqrt(double x);
long double invsqrtl(long double x);
float invsqrtf(float x);

ldexp

Description: The ldexp function returns x*2exp, where exp is an integer value.

errno: ERANGE, for underflow and overflow conditions

Calling interface:
double ldexp(double x, int exp);
long double ldexpl(long double x, int exp);
float ldexpf(float x, int exp);

log

Description: The log function returns the natural log of x, ln(x).

errno: EDOM, for x < 0
errno: ERANGE, for x = 0

Calling interface:
double log(double x);
long double logl(long double x);
float logf(float x);

log10

Description: The log10 function returns the base-10 log of x, log10(x).

errno: EDOM, for x < 0
errno: ERANGE, for x = 0

Calling interface:
double log10(double x);
long double log10l(long double x);
float log10f(float x);

log1p

Description: The log1p function returns the natural log of (x+1), ln(x + 1).

errno: EDOM, for x < -1
errno: ERANGE, for x = -1

Calling interface:
double log1p(double x);
long double log1pl(long double x);
float log1pf(float x);

log2

Description: The log2 function returns the base-2 log of x, log2(x).

errno: EDOM, for x < 0
errno: ERANGE, for x = 0

Calling interface:
double log2(double x);
long double log2l(long double x);
float log2f(float x);

logb

Description: The logb function returns the signed exponent of x.

errno: EDOM, for x = 0

Calling interface:
double logb(double x);
long double logbl(long double x);
float logbf(float x);

pow

Description: The pow function returns x raised to the power of y, xy.

errno: EDOM, for x = 0 and y < 0
errno: EDOM, for x < 0 and y is a non-integer
errno: ERANGE, for overflow and underflow conditions

Calling interface:
double pow(double x, double y);
long double powl(double x, double y);
float powf(float x, float y);

pow2o3

Description: The pow2o3 function returns the cube root of x squared, cbrt(x2).

Calling interface:
double pow2o3(double x);
float pow2o3f(float x);

pow3o2

Description: The pow3o2 function returns the square root of the cube of x, sqrt(x3).

errno: EDOM, for x < 0
errno: ERANGE, for overflow and underflow conditions

Calling interface:
double pow3o2(double x);
float pow3o2f(float x);

powr

Description: The powr function returns x raised to the power of y, xy, where x ≥ 0.

errno: EDOM, for x < 0
errno: ERANGE, for overflow and underflow conditions

Calling interface:
double powr(double x, double y);
float powrf(float x, float y);

scalb

Description: The scalb function returns x*2y, where y is a floating-point value.

errno: ERANGE, for underflow and overflow conditions

Calling interface:
double scalb(double x, double y);
long double scalbl(long double x, long double y);
float scalbf(float x, float y);

scalbn

Description: The scalbn function returns x*2n, where n is an integer value.

errno: ERANGE, for underflow and overflow conditions

Calling interface:
double scalbn(double x, int n);
long double scalbnl (long double x, int n);
float scalbnf(float x, int n);

scalbln

Description: The scalbln function returns x*2n, where n is a long integer value.

errno: ERANGE, for underflow and overflow conditions

Calling interface:
double scalbln(double x, long int n);
long double scalblnl (long double x, long int n);
float scalblnf(float x, long int n);

sqrt

Description: The sqrt function returns the correctly rounded square root.

errno: EDOM, for x < 0

Calling interface:
double sqrt(double x);
long double sqrtl(long double x);
float sqrtf(float x);

Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.