531
EXP, EXPP
1
2
3
4
4
6
7
8
7.12
Special function
instructions
7.12.2
1
EXP
, E
XPP
Operat
i
on
E
rror
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into
SD0.
*2:
There are CPU modules that will not result in an operation error if -0 is specified.
For details, refer to Page 88, Section 3.2.4.
Program
E
xamp
l
e
(1) The following program performs an exponent operation on the value set by the 2 BCD digits at X20 to X27, and stores
the results as a 32-bit floating decimal point real number at D0 and D1.
[Ladder Mode]
[List Mode]
[Operations involved when value designated by X20 to X27 is 13]
*4:
The operation result will be under 2
129
if the BCD value of X20 to X27 is less than 89, from the calculation loge 2
129
= 89.4.
Because setting a value of over 90 will return an operation error, turn M1 ON if a value of over 90 has been set to avoid the
error.
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4100
The operation result is not within the following range:
2
-126
| Operation result | < 2
128
––
––
––
––
––
The operation result is not within the following range:
2
-126
| Operation result | < 2
128
––
––
––
The specified device value is -0.
*2
––
––
4140
The specified device value is -0, unnormalized number, nonnumeric, or
±
.
––
––
––
––
4141
The operation result exceeds the following range (when an overflow
occurs):
2
128
| Operation result |
––
––
––
––
Inputs the data used for
exponent operation ( ).
Con
v
erts the input data into
a 32-bit floating-point real number ( ).
Executes exponent operation ( ).
Checks the range of the
v
alue for operation. *4
1
2
3
Step
I
nstruct
i
on
De
vi
ce
BCD
v
a
l
ue
D20
1 3
X20
Con
v
ers
i
on
to
B
IN
B
IN
b15
b0
B
IN v
a
l
ue
13
Con
v
ers
i
on
to
f
l
oat
i
ng
-
po
i
nt
FLT
E
XP
operat
i
on
D11
D10
E
XP
D1
D0
X27
32
-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
32
-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
1 3
4 4
2
4
1 3
. 4
1
2
3