Developer Guide and Reference

Contents

Exponential 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 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,
e
x
.
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, 10
x
.
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, 2
x
.
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,
e
x
-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
(x
2
+ y
2
)
.
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*2
exp
, 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
, log
10
(
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);