572
Double-precision Floating-point Instructions (CS1-H, CJ1-H, CJ1M, or CS1D Only)
Section 3-16
• +
∞
• Not a number (NaN)
Special Numbers
The formats for NaN,
±∞
, and 0 are as follows:
NaN*:
e = 1,024 and f
≠
0
+
∞
:
e = 1,024, f = 0, and s= 0
–
∞
:
e = 1,024, f = 0, and s= 1
0:
e = 0 and f = 0
*NaN (not a number) is not a valid floating-point number. Executing Double-
precision Floating-point instructions will not result in NaN.
Writing Floating-point
Data
When double-precision floating-point is specified for the data format in the I/O
memory edit display in the CX-Programmer, standard decimal numbers input
in the display are automatically converted to the double-precision floating-
point format shown above (IEEE754-format) and written to I/O Memory. Data
written in the IEEE754-format is automatically converted to standard decimal
format when monitored on the display.
It isn’t necessary for the user to be aware of the IEEE754 data format when
reading and writing double-precision floating-point data. It is only necessary to
remember that double-precision floating point values occupy four words each.
Numbers Expressed as Floating-point Values
The following types of floating-point numbers can be used.
Note 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
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
52
– 1), and it is assumed that,
in the real mantissa, bit 2
52
is 1 and the decimal point follows immediately
after it.
Normalized numbers are expressed as follows:
(–1)
(sign s)
x 2
(exponent e)–1,023
x (1 + mantissa x 2
–52
)
−∞
−
1
0
+
∞
1
−
2.22507385850720
×
10-
308
−
1.79769313486232
×
10
308
2.22507385850720
×
10-
308
1.79769313486232
×
10
308
0
63
f
n
s
e
62
5251
n+3
n+2
n+1
1615
3231
4847
Mantissa (f)
Exponent (e)
0
Not 0 and
not all 1’s (1,024)
All 1’s (1,024)
0
0
Normalized number Infinity
Not 0
Non-normalized
number
NaN
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...