Texas Instruments TMS320C3x 사용자 설명서

다운로드
페이지 757
Floating-Point Multiplication
 
5-26
5.5
Floating-Point Multiplication
A floating-point number 
α
 can be written in floating-point format as in the following
formula, where 
α
(
man) is the mantissa and 
α
(
exp) is the exponent:
α
=
α
(
man) 
×
 2
α
(
exp)
The product of 
α
 and 
b is c, defined as:
c =
α
 
×
 
b = 
α
(
man) 
×
 
b(man) 
×
 2
(
α
(
exp) + b (exp))
thus:
c(man) =
α
(
man) 
×
 
b(man)
c(exp) =
α
(
exp) + b(exp)
During floating-point multiplication, source operands are in the single-precision
floating-point format. If the source operands are in short floating-point format,
they are converted to single-precision floating-point format. If the source oper-
ands are in extended-precision floating-point format, they are truncated to
single-precision format. These conversions occur automatically in hardware
with no overhead. All results of floating-point multiplications are in the extended-
precision format. These multiplications occur in a single cycle.
Figure  5–16 is a flowchart that shows the steps involved in floating-point multi-
plication. Each step is labelled with a number in parenthesis.
-
In step 1, the 24-bit source operand mantissas are multiplied, producing
a 50-bit result 
c(man). (Input and output data are always represented as
normalized numbers.)
-
In step 2, the exponents, 
α
(
exp) and b(exp), are added, yielding c(exp).
-
Step 3 checks for whether 
c(man) in extended-precision format is equal to
0. If 
c(man) is 0, step 7 sets c(exp) to –128, thus yielding the representation
for 0.
-
Steps 4 and 5 normalize the result.
-
If a right shift of 1 is necessary, then in step 8, 
c(man) is right-shifted one
bit, thus adding 1 to 
c(exp).
-
If a right shift of 2 is necessary, then in step 9, 
c(man) is right-shifted two
bits, thus adding 2 to 
c(exp). Step 6 occurs when the result is normalized.
-
In step 10, 
c(man) is set in the extended-precision floating-point format.
-
Steps 11 through 16 check for special cases of 
c(exp).