CP Floating-Point Arithmetic Instructions
Floating Divide
4 4 i j k
Floating divide (Xj) by
( X k )
t o
X i
This i n s t r u c t i o n r e a d s operands from two X r e g i s t e r s , o p e r a t e s on them t o form
a floating-point q u o t i e n t , and d e l i v e r s t h i s r e s u l t t o a t h i r d
X
r e g i s t e r .
The
operands f o r t h i s i n s t r u c t i o n a r e i n
X j
and
Xk.
These operands a r e i n
f l o a t i n g - p o i n t format.
The r e s u l t of d i v i d i n g t h e content of
X j
by the c o n t e n t
of
Xk i s
delivered t o
X i .
If both operands a r e normalized, the quotient i s
a l s o normalized.
The remainder from the d i v i s i o n process
i s
discarded.
The two operands a r e unpacked from floating-point format.
The exponents a r e
subtracted with
a c o r r e c t i o n f a c t o r t o determine t h e exponent f o r t h e r e s u l t .
The c o e f f i c i e n t from X j i s positioned i n a dividend r e g i s t e r .
The c o e f f i c i e n t
from
Xk
i s t r i a l - s u b t r a c t e d repeatedly from the dividend.
The quotient b i t s
a r e assembled i n a q u o t i e n t r e g i s t e r .
When
48
b i t s of t h e q u o t i e n t a r e
assembled, they a r e packed with the r e s u l t exponent i n t o f l o a t i n g - p o i n t format
and delivered t o X i .
If the exponent s u b t r a c t i o n causes
an
underflow o r overflow, a n underflow o r
overflow r e s u l t i s r e t u r n e d even with t h e occurrence of a d i v i d e f a u l t .
I f the dividend i s not normalized, t h e q u o t i e n t cannot
be
normalized.
However,
the q u o t i e n t i s c o r r e c t even though t h e r e may be l e a d i n g z e r o s i n the
c o e f f i c i e n t .
I f t h e d i v i s o r i s not normalized, t h e q u o t i e n t may be i n c o r r e c t .
I f the c o e f f i c i e n t f o r t h e content of X j i s l a r g e r than t h e c o e f f i c i e n t f o r the
content of
Xk
by a f a c t o r of two o r more, a d i v i d e f a u l t causes an i n d e f i n i t e
r e s u l t t o be returned t o
X i .
This i n s t r u c t i o n is used i n floating-point c a l c u l a t i o n s where rounding of
operands
i s not d e s i r e d .
I n multiple-precision d i v i s i o n , t h i s i n s t r u c t i o n
m u s t
be followed by a m u l t i p l i c a t i o n of t h e q u o t i e n t by t h e d i v i s o r and s u b t r a c t e d
from the dividend t o r e c o n s t r u c t the remainder.
If i n f i n i t e (3777mrx...x
o r 4000xgx...x)
o r i n d e f i n i t e (1777xxx...x
o r
6000xxx...x)
operands a r e used, corresponding e x i t c o n d i t i o n s a r e s e t i n t h e C P
f o r e x i t mode a c t i o n .
For f u r t h e r information, r e f e r t o Floating-point Arithmetic under C P
Programming i n chapter 5.
Need help?
Do you have a question about the Cyber 170 State and is the answer not in the manual?
Questions and answers