Motorola DSP Developer's Kit | ![]() ![]() |
Y = mot###_log10( X )
Description
This function returns the base 10 logarithm of complex input vector X.
Input/Output
Algorithm
log10(a+bi) = log10(sqrt(a^2 + b^2))+angle(a,b)*log10(e)*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 log10-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 is 22
In the case of dsp56600, loopnum is 14
6 for dsp56300
5 for dsp56600
Assumes M{0...7} = $ffff
Status Register
The assembly function log10-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.
![]() | log10-r.asm | max-1r.asm | ![]() |