Exponential 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. This function may be inlined by the Itanium® compiler.

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 frexp(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);

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). This function may be inlined by the Itanium® compiler.

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). This function may be inlined by the Itanium® compiler.

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.

Calling interface:

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

double pow(double x, double y);
long double powl(double x, double y);
float powf(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);