Publication 1766-RM001A-EN-P - October 2008
202
Math Instructions
Definitions
Overflow
- occurs when the result of an operation produces an exponent
that is greater than 254.
Underflow
- occurs when the result of an operation produces an
exponent that is less than one.
Floating Point Exception Values
Zero
- represented by an exponent and a mantissa of zero. Both positive
and negative zero are valid.
Denormalized
- represented by an exponent of zero and a non-zero
mantissa part. Since denormalized numbers have very small, insignificant
values, they are treated as zero when used as source operand for most
instructions. This reduces execution time. Denormalized numbers are not
generated by the instructions (but are propagated by some instructions).
Zero is generated on an underflow.
Infinity
- represented by an exponent of 255 and a mantissa part of zero.
Both positive and negative infinity are generated when operations
overflow. Infinity is propagated through calculations.
NAN (not a number)
- is represented by an exponent of 255 and a
non-zero mantissa part. NANs are used to indicate results that are
mathematically undefined such as 0/0 and adding plus infinity to minus
infinity. All operations given a NAN as input must generate a NAN as
output.
LSB Round-to-Even Rule
Floating point operations are rounded using the round-to-even rule. If the
bits of the result to the right of the least significant bit (LSB) represent a
value less than one-half of the LSB, then the result remains as is. If the bits
to the right of the LSB represent a value greater than one-half of the LSB,
the result is rounded up by adding one LSB. If the bits to the right of the
LSB represent a value of exactly one-half LSB, the result is rounded up or
down so that the LSB is an even number.
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive