Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 560

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Double-precision Floating-point Instructions
Numbers Expressed
as Floating-point
Values
Note
Normalized Numbers
Non-normalized numbers
The following types of floating-point numbers can be used.
Mantissa (f)
0
0
Not 0
Non-normalized
number
A non-normalized number is one whose absolute value is too small to be
expressed as a normalized number. Non-normalized numbers have fewer sig-
nificant digits. If the result of calculations is a non-normalized number (includ-
ing intermediate results), the number of significant digits will be reduced.
Normalized numbers express real numbers. The sign bit will be 0 for a positive
number and 1 for a negative number.
The exponent (e) will be expressed from 1 to 2,046, and the real exponent will
be 1,023 less, i.e., –1,022 to 1,023.
The mantissa (f) will be expressed from 0 to (2
in the real mantissa, bit 2
after it.
Normalized numbers are expressed as follows:
(sign s)
(exponent e)–1,023
(–1)
x 2
Example
32
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
63 62
52 51
Sign:
Exponent:
1,024 – 1,023 = 1
51
Mantissa:
1 + (2
Value:
–1.75 x 2
Non-normalized numbers express real numbers with very small absolute val-
ues. The sign bit will be 0 for a positive number and 1 for a negative number.
The exponent (e) will be 0, and the real exponent will be –1,022.
The mantissa (f) will be expressed from 1 to (2
in the real mantissa, bit 2
after it.
Non-normalized numbers are expressed as follows:
(sign s)
–1,022
(–1)
x 2
x (mantissa x 2
Example
32
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
64 63
52
51
Sign:
Exponent:
–1,022
51
Mantissa:
0 + (2
Value:
–0.75 x 2
Exponent (e)
0
Not 0 and
not all 1's (1,024)
Normalized number Infinity
52
52
is 1 and the decimal point follows immediately
x (1 + mantissa x 2
50
–52
–1
+ 2
) x 2
= 1 + (2
+ 2
1
= –3.5
52
52
is 0 and the decimal point follows immediately
–52
)
50
–52
–1
+ 2
) x 2
= 0 + (2
–1,022
–308
= 1.668805 x 10
Section 3-15
All 1's (1,024)
NaN
– 1), and it is assumed that,
–52
)
0
33
–2
) = 1 + (0.75) = 1.75
– 1), and it is assumed that,
0
33
–2
+ 2
) = 0 + (0.75) = 0.75
527

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents