Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 550

Table of Contents

Advertisement

3. Instructions
• Special Numbers
The formats for NaN,
• NaN*:e = 2,047 and f
• + :e = 2,047, f = 0, and s= 0
• - : e = 2,047, 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.
s
e
6362
5251
4847
n+3
n+2
It is not 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.
Mantissa (f)
0
Not 0
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 significant digits. If the result of calculations is a non-normalized number (including
intermediate results), the number of significant digits will be reduced.
(1) 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
bit 2
is 1 and the decimal point follows immediately after it.
Normalized numbers are expressed as follows:
(sign s)
(-1)
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
514
, and 0 are as follows:
0
f
3231
1615
0
n+1
n
0
0
Non-normalized number
(exponent e)-1,023
2
(1 + mantissa
52 51
Exponent (e)
Not 0 and not all 1's (1,024)
Normalized number
52
- 1), and it is assumed that, in the real mantissa,
-52
2
)
0
33
CS/CJ/NSJ Series Instructions Reference Manual (W474)
All 1's (1,024)
Infinity
NaN

Advertisement

Table of Contents
loading

Table of Contents