21.07.2015 Views

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

log_2log_2Base 2 LogarithmFunctionushort oflag = log_2 (DATA *x, LDATA *r, ushort nx)(defined in log_2.asm)Argumentsx[nx]r[nx]nxoflagPointer to input vector of size nx.Pointer to output data vector (Q31 format) of size nx.Length of input and output data vectorsOverflow flag. If oflag = 1, a 32-bit overflow has occurred. If oflag = 0, a 32-bit overflow has not occurred.DescriptionComputes the log base 2 of elements of vector x using Taylor series.Algorithm for (i 0; i nx; i ) y(i) log 12x(i) where 0 x(i) 1Overflow Handling MethodologyNo scaling implemented for overflow preventionSpecial Requirements noneImplementation Notes y = 1.4427 * ln(x) with x = M(x)*2^P(x) = M*2^Py = 1.4427 * (ln(M) + ln(2)*P)y = 1.4427 * (ln(2*M) + (P–1)*ln(2))y = 1.4427 * (ln((2*M–1)+1) + (P–1)*ln(2))y = 1.4427 * (f(2*M–1) + (P–1)*ln(2))with f(u) = ln(1+u).We use a polynomial approximation for f(u) :f(u) = (((((C6*u+C5)*u+C4)*u+C3)*u+C2)*u+C1)*u+C0for 0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!