Chapter 3. Program Data
GFK-2950C
February 2018
53
3.9.2
Floating Point Numbers
Floating point numbers are stored in one of two IEEE 754 standard formats that uses adjacent 16-bit
words: 32-bit single precision or 64-bit double precision.
The REAL data type represents single precision floating point numbers. The LREAL data type
represents double precision floating point numbers. REAL and LREAL variables are typically used to
store data from analog I/O devices, calculated values, and constants.
Types of Floating Point Variables
Data Type
Precision and Range
REAL
Limited to 6 or 7 significant digits, with a range of approximately
±1.401298x10
-45
through ±3.402823x10
38
.
LREAL
Limited to 17 significant digits, with a range of approximately
±2.2250738585072020x10
-308
to ±1.7976931348623157x10
308
.
Note:
The programming software allows 32-bit and 64-bit arguments (DWORD, DINT, REAL, and
LREAL) to be placed in discrete memories such as %I, %M, and %R in the PACSystems target.
This is not allowed on Series 90-70 targets. (Note that any bit reference address that is
passed to a non-bit parameter must be byte-aligned. This is the same as the Series 90-70
CPU.)
Internal Format of REAL Numbers
16
1
32
17
8-bit exponent
1-bit sign (Bit 32)
Bits 1-16
Bits 17-32
23-bit mantissa
Register use by a single floating point number is diagrammed below. For example, if the floating point
number occupies registers R5 and R6, R5 is the least significant register and R6 is the most
significant register.
Bits 17-32
Most Significant Register
Least Significant Bit
Most Significant Bit
32
17
16
1
Bits 1-16
Least Significant Register
Least Significant Bit
Most Significant Bit
Internal Format of LREAL Numbers
1
11-bit exponent
1-bit sign (Bit 64)
Bits 1-16
Bits 49-64
52-bit mantissa
Bits 17-32
Bits 33-48
Summary of Contents for PACSystems RX7i
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451...