Omron CS1G/H-CPUxxH Instructions Manual page 594

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxxH:
Table of Contents

Advertisement

Double-precision Floating-point Instructions (CS1-H, CJ1-H, CJ1M, or CS1D Only)
Non-normalized numbers
Zero
Infinity
NaN
Floating-point Arithmetic Results
Rounding Results
Example
32
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 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
63 62
Sign:
Exponent:
1,024 – 1,023 = 1
Mantissa:
1 + (2
Value:
–1.75 x 2
Non-normalized numbers express real numbers with very small absolute val-
ues. 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 –1,022.
The mantissa (f) will be expressed from 1 to (2
in the real mantissa, bit 2
after it.
Non-normalized numbers are expressed as follows:
(sign s)
–1,022
(–1)
x 2
Example
32
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 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
64 63
Sign:
Exponent:
–1,022
Mantissa:
0 + (2
Value:
–0.75 x 2
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.
Values of + ∞ and – ∞ can be expressed by setting the sign to 0 for positive or 1
for negative. The exponent will be 2,047 (2
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
8
will be 255 (2
– 1) and the mantissa will be not 0.
Note There are no specifications for the sign of NaN or the value of the mantissa
field (other than to be not 0).
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.
52 51
51
50
–52
+ 2
) x 2
= 1 + (2
1
= –3.5
52
is 0 and the decimal point follows immediately
–52
x (mantissa x 2
)
52
51
51
50
–52
+ 2
) x 2
= 0 + (2
–1,022
= 1.668805 x 10
11
Section 3-16
0
33
–1
–2
+ 2
) = 1 + (0.75) = 1.75
52
– 1), and it is assumed that,
0
33
–1
–2
+ 2
) = 0 + (0.75) = 0.75
–308
– 1) and the mantissa will be 0.
573

Advertisement

Table of Contents
loading

Table of Contents