360
Floating-point Math Instructions
Section 5-24
The various combinations of dividend and divisor data will produce the results
shown in the following table.
Note
1.
The results could be zero (including underflows), a numeral, +
∞
, or –
∞
.
2.
The results will be zero for underflows.
3.
The Error Flag will be turned ON and the instruction won’t be executed.
Flags
ER:
Indirectly addressed EM/DM word is non-existent.
(Content of
*
EM/
*
DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
ON if the dividend or divisor data is not recognized as floating-point
data.
EQ:
ON if both the exponent and mantissa of the result are 0.
OF:
ON if the absolute value of the result is too large to be expressed as a
32-bit floating-point value. (The result will be output as
±∞
.)
UF:
ON if the absolute value of the result is too small to be expressed as a
32-bit floating-point value. (The result will be output as 0.)
5-24-9 DEGREES TO RADIANS: RAD(––)
Limitations
The source data in S+1 and S must be in IEEE754 floating-point data format.
DM 6143 to DM 6655 cannot be used for R.
Description
When the execution condition is OFF, RAD(––) is not executed. When the
execution condition is ON, RAD(––) converts the 32-bit floating-point number
in S+1 and S from degrees to radians and places the result in R and R+1.
(The floating point source data must be in IEEE754 format.)
Degrees are converted to radians by means of the following formula:
Degrees
×
π
/180 = radians
Dividend
Divisor
0
Numeral
+
∞
–
∞
NaN
0
See note 3.
+/–
∞
+
∞
–
∞
Numeral
0
See note 1.
+/–
∞
+/–
∞
+
∞
0
See note 2.
See note 3.
See note 3.
–
∞
0
See note 2.
See note 3.
See note 3.
NaN
See note 3.
S
:
First source word
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
R
:
First result word
IR, SR, AR, DM, EM, HR, LR
Ladder Symbols
Operand Data Areas
Third operand
:
Always 000
−−−
RAD(
−−
)
S
R
000
@RAD(
−−
)
S
R
000
R+1
R
S
Source (degrees, 32-bit floating-point data)
S+1
Result (radians, 32-bit floating-point data)