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.

ecip16recip1616-bit Reciprocal FunctionFunctionvoid recip16 (DATA *x, DATA *r, DATA *rexp, ushort nx)Argumentsx[nx]r[nx]rexp[nx]nxPointer to input data vector 1 of size nx.x[0]x[1]..x[nx–2]x[nx–1]Pointer to output data bufferr[0]r[1]..r[nx–2]r[nx–1]Pointer to exponent buffer for output values. Theseexponent values are in integer format.rexp[0]rexp[1]..rexp[nx–2]rexp[nx–1]Number of elements of input and output vectorsDescriptionThis routine returns the fractional and exponential portion of the reciprocal ofa Q15 number. Since the reciprocal is always greater than 1, it returns an exponentsuch that:r[i] * rexp[i] = true reciprocal in floating-pointAlgorithmYm 2*Ym Ym 2 * XnormIf we start with an initial estimate of Ym, the equation converges to a solutionvery rapidly (typically 3 iterations for 16-bit resolution).4-84

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

Saved successfully!

Ooh no, something went wrong!