I'd like to use the recip16 and ldiv16 functions in DSPLIB, but the documentation leaves much to be desired.
For instance recip16() takes an input X of type Q.15 and returns two outputs, R and REXP, both of type Q.15. The documentation states that R*REXP is the "true reciprocal" of X. That would seem to imply that
X * R * REXP = 1<<32
but I doubt this. I suspect that
(X * R) << REXP = 1<<32
Which statement is true?
The function ldiv16 is described with similar ambiguity. Its inputs are X (Q.31), Y (Q.15) and its outputs are R and REXP (both Q.15). The documentation of these latter seems to have been copied from recip16 and doesn't make sense in this context. I'm guessing that what's really meant is that
(Y * R) <<REXP = X
Is this interpretation correct?
Finally, the documentation for both functions mentions that they are based on an iteration of the form:
Ym = 2 * Ym - Ym * Ym * Xnorm
but neither Ym nor Xnorm are defined. Does anyone understand what's going on here?