CSI-DSP  Version 1.0.0
CSI DSP Software Library
Functions
Exponential series Functions

Functions

float64_t csky_exp_f64 (float64_t x)
 Fast approximation to the exponential function based on e for float64_t -point_t data. More...
 
float64_t csky_pow2_f64 (float64_t x)
 Fast approximation to the 2 based exponential function for float64_t -point data. More...
 
float64_t csky_pow_f64 (float64_t x, float64_t y)
 Fast approximation to the exponential function for float64_t-point data. More...
 

Description

Exponentional series functions includes pow, pow2 and exp, which are represented any value based, 2 based and e based Exponentional function repectively. The common methods to compute these functions are ploynomial approximation and table loop-up. And, it is a double floating version for the functions, say, the input and output are both double.

Function Documentation

float64_t csky_exp_f64 ( float64_t  x)
Parameters
[in]xinput value in double.
Returns
e^x.

The implementation is based on table lookup using 712 coarse values together with 1024 fine values which are both in double format.

The steps used are:

  1. First, compute the result with table lookup when smallint < x < bigint.
  2. Then, process the special case namely x > badint or x < smallint.
  3. Finally, compute the result with table loopup when bigint < x < badint.
float64_t csky_pow2_f64 ( float64_t  x)
Parameters
[in]xinput value in double.
Returns
2^x.

The implementation is based on table lookup using 512 delta values combining with 512 accurate values.

The steps used are:

  1. processing of special cases.
  2. argument reduction. Choose integers ex, -256 <= t < 256, and some real -1/1024 <= x1 <= 1024 so that
     x = ex + t/512 + x1
  3. adjust for accurate table entry. Find e so that
     x = ex + t/512 + e + x2
    where -1e6 < e < 1e6, and (float64_t)(2^(t/512+e)) is accurate to one part in 2^-64.
  4. approximate 2^x2 - 1, using a fourth-degree polynomial, with maximum error in [-2^-10-2^-30,2^-10+2^-30] less than 10^-19.
float64_t csky_pow_f64 ( float64_t  x,
float64_t  y 
)
Parameters
[in]xinput value in double, the base of pow.
[in]xinput value in double, the exponention of pow.
Returns
x^y.

The implementation is based on the transform

 x^y = e^(y*log(x))

The steps used are:

  1. First, calculation of the nearest value of log(x) with series expansion or table look up depending on the range of x.
  2. Then, compute of the nearest value of e^(y*log(x)) with the function e^(x+xx), in which, defferent methods are used based on the range of x.
  3. Finally, some special cases are processed.