Single-Precision Floating-Point Reciprocal Approximation
RCPSP
4-63
TMS320C67x Floating-Point Instruction Set
Syntax
RCPSP (.unit)
src2, dst
.unit = .S1 or .S2
Opcode map field used...
For operand type...
Unit
src2
dst
xsp
sp
.S1, .S2
Opcode
31
29 28 27
23 22
18 17
creg
z
dst
13 12
5
4
3
2
1
0
1 1 1 1 0 1
0
0
0
s
p
3
5
5
5
6
6
1
11
x
00000
src2
Description
The single-precision floating-point reciprocal approximation value of
src2 is
placed in
dst.
The RCPSP instruction provides the correct exponent, and the mantissa is
accurate to the eighth binary position (therefore, mantissa error is less than
2
–8
). This estimate can be used as a seed value for an algorithm to compute
the reciprocal to greater accuracy. The Newton-Rhapson algorithm can further
extend the mantissa’s precision:
x[n+1] = x[n](2 – v*x[n])
where v = the number whose reciprocal is to be found.
x[0], the seed value for the algorithm, is given by RCPSP. For each iteration,
the accuracy doubles. Thus, with one iteration, accuracy is 16 bits in the
mantissa; with the second iteration, the accuracy is the full 23 bits.
Execution
if (cond)
rcp(
src2)
→
dst
else
nop