CSI-DSP
Version 1.0.0
CSI DSP Software Library
|
Functions | |
float64_t | csky_log10_f64 (float64_t x) |
Fast approximation to the 10 base logarithm function for float64_t -point data. More... | |
float64_t | csky_log2_f64 (float64_t x) |
Fast approximation to the 2 based logarithm function for float64_t -point data. More... | |
float64_t | csky_log_f64 (float64_t x) |
Fast approximation to the 2 based logarithm function for float64_t -point data. More... | |
Logarithm series functions includes log, log2 and log10, which are represented e based, 2 based and 10 based logarithm function repectively. As exponentional functions, 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.
[in] | x | input value in double. |
The implementation is based on base transform from 10 to e.
The steps used are:
[in] | x | input value in double. |
The implementation is based on the transform
log2(x) = log2^k*(1+f) where sqrt(2)/2 < 1+f < sqrt(2) = k + log(1+f)/log2. And then log(1+f) = log(1+s) - log(1-s), where s = f/(1+f) = 2s + 2/3 s**3 + 2/5 s**5 + ....., = 2s + s*R where R(z) ~ Lg1*s +Lg2*s +Lg3*s +Lg4*s +Lg5*s +Lg6*s +Lg7*s
So the steps used are:
[in] | x | input value in double. |
The implementation is based on range of abs(x-1), when abs(x-1) < 0.03, series expansion is used, and when abs(x-1) > 0.03 series expansion combining with table loop up is used.
The steps used are: