Chapter 3. Program Data
54
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
GFK-2950C
Errors in Floating Point Numbers and Operations
Overflow occurs when a REAL or LREAL function generates a number outside the allowed range.
When this occurs, the Enable Out output of the function is set Off, and the result is set to positive
infinity (for a number greater than the upper limit) or negative infinity (for a number less than the
lower limit). You can determine where this occurs by testing the sense of the Enable Out output.
Binary representations of Infinity and NaN values have exponents that contain all 1s.
IEEE 754 Infinity Representations
REAL
LREAL
POS_INF (positive infinity) = 7F800000h = 7FF0000000000000h
NEG_INF (negative infinity) = FF800000h = 7FF0000000000001h
If the infinities produced by overflow are used as operands to other REAL or LREAL functions, they
may cause an undefined result. This undefined result is referred to as an NaN (Not a Number). For
example, the result of adding positive infinity to negative infinity is undefined. When the ADD_REAL
function is invoked with positive infinity and negative infinity as its operands, it produces an NaN. If
any operand of a function is a NaN, the result will be some NaN.
Note:
For NaN, the Enable Out output is Off (not energized).
IEEE 754 Representations of NaN values:
REAL
LREAL
7F800001 through 7FFFFFFF 7FF8000000000001 through 7FFFFFFFFFFFFFFF
FF800001 through FFFFFFFF FFF0000000000001 through FFFFFFFFFFFFFFFF
Note:
For releases 5.0 and greater, the CPU may return slightly different values for NaN compared
to previous releases. In some cases, the result is a special type of NaN displayed as #IND in
Machine Edition. In these cases, for example, EXP(-infinity), power flow out of the function is
identical to that in previous releases.
Summary of Contents for PACSystems RSTi-EP
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451 ...