Motorola DSP Developer's Kit | ![]() ![]() |
Y = mot###_log( X )
Description
This function returns the natural logarithm elements of complex input vector X.
Input/Output
Algorithm
log(a+bi) = log(sqrt(a^2 + b^2))+angle(a,b)*i
If an absolute result is needed, the real data of the result should be scaled up by 32 and imaginary data of the result should be scaled up by 4. Please refer to the algorithms used in log-r.asm
and angle-c.asm
.
Memory & Register
+0--X +1--Y +2--log(sqrt(Xr[i]*Xr[i]+Xi[i]*Xi[i])/32(or 16)
In the case of dsp56300, loopnum = 22
In the case of dsp56600, loopnum = 14
6 for dsp56300
5 for dsp56600
Assumes M{0...7} = $ffff
Status Register
The assembly function log-c.asm
does not explicitly set any status registers/bits during the function execution.
Data Size Limit
The length of vector X can't be larger than the continuous available data memory size.
Data Range Limit
The value of input vector X must be between -1.0 and +1.0.
Precision
In the case of DSP563, precision is 16 bits.
In the case of DSP566, precision is 12 bits.
![]() | log-r.asm | log10-r.asm | ![]() |