2 Instructions
2-232
CP1E CPU Unit Instructions Reference Manual(W483)
(3) Precautions in Handling Special Values
The following precautions apply to handling zero, infinity, and NaN.
• The sum of positive zero and negative zero is positive zero.
• The difference between zeros of the same sign is positive zero.
• If any operand is a NaN, the Error Flag will be turned ON and the tests will not be executed.
• Positive zero and negative zero are treated as equivalent in comparisons.
• Comparison or equivalency tests on one or more NaN will not be executed and the Error Flag will be
turned ON.
Floating-point Calculation Results
When the absolute value of the result is greater than the maximum value that can be expressed for
floating-point data, the Overflow Flag will turn ON and the result will be output as ±∞. If the result is pos-
itive, it will be output as +∞; if negative, then –∞.
The Equals Flag will only turn ON when both the exponent (e) and the mantissa (f) are zero after a cal-
culation. A calculation result will also be output as zero when the absolute value of the result is less
than the minimum value that can be expressed for floating-point data. In that case the Underflow Flag
will turn ON.