Omron SYSMAC CP Series Instruction & Reference Manual page 267

Cpu unit
Hide thumbs Also See for SYSMAC CP Series:
Table of Contents

Advertisement

(2) Non-normalized Numbers
Non-normalized numbers express real numbers with very small absolute values. The sign bit will be 0
for a positive number and 1 for a negative number.
The exponent (e) will be 0, and the real exponent will be –126.
The mantissa (f) will be expressed from 1 to 2
is 0 and the binary point follows immediately after it.
Non-normalized numbers are expressed as follows:
(sign s)
× 2
–126
(–1)
Example
Sign:
Exponent:
Mantissa:
Value:
(3) Zero
Values of +0.0 and –0.0 can be expressed by setting the sign to 0 for positive or 1 for negative. The
exponent and mantissa will both be 0. Both +0.0 and –0.0 are equivalent to 0.0. Refer to Floating-point
Arithmetic Results, below, for differences produced by the sign of 0.0.
(4) Infinity
Values of +∞ and –∞ can be expressed by setting the sign to 0 for positive or 1 for negative. The expo-
nent will be 255 (2
(5) NaN
NaN (not a number) is produced when the result of calculations, such as 0.0/0.0, ∞/∞, or ∞–∞, does not
correspond to a number or infinity. The exponent will be 255 (2
Note There are no specifications for the sign of NaN or the value of the mantissa field (other than to be not 0).
Floating-point Arithmetic Results
(1) Rounding Results
The following methods will be used to round results when the number of digits in the accurate result of
floating-point arithmetic exceeds the significant digits of internal processing expressions.
If the result is close to one of two internal floating-point expressions, the closer expression will be used.
If the result is midway between two internal floating-point expressions, the result will be rounded so that
the last digit of the mantissa is 0.
(2) Overflows, Underflows, and Illegal Calculations
Overflows will be output as either positive or negative infinity, depending on the sign of the result.
Underflows will be output as either positive or negative zero, depending on the sign of the result.
Illegal calculations will result in NaN. Illegal calculations include adding infinity to a number with the
opposite sign, subtracting infinity from a number with the opposite sign, multiplying zero and infinity,
dividing zero by zero, or dividing infinity by infinity.
The value of the result may not be correct if an overflow occurs when converting a floating-point number
to an integer.
CP1E CPU Unit Instructions Reference Manual(W483)
× (mantissa x 2
–23
)
31 30
23 22
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 0 0 0
–126
) × 2
0 + (2
22
+ 2
21
23
= 0 + (2
–0.75 × 2
126
8
– 1) and the mantissa will be 0.
33
– 1, and it is assume that, in the real mantissa, bit 2
1
+ 2
2
) = 0 + 0.75 = 0.75
8
– 1) and the mantissa will be not 0.
2 Instructions
0
33
2
2-231

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents