Download FA-M3 Programming Tool WideField3 (Script)

Transcript
G8-14
G8.7
SQR (Square Root)
SQR() is a function for calculating a square root.
This function stores the square root of s in the return value.
Return value = SQR(s)
Return
Value/
Arguments
Prefix*1
Description
A data value whose
square root is
calculated or the first
device number of
devices for which the
square root is
calculated.
The square root of s.
The data type of the
return value is the same
as that of the argument.
s
Return
value
W
L
D
F
E










S
B
Constant
Expression
Index
Modification




*1: Specify the same prefix for s and the return value.
 Return Value/Arguments
Return
Value/
Arguments
Input/Output
Range
Behavior Restrictions
s
Input
s≥0
Return
value
Output
-
If s < 0, an instruction processing error occurs during
execution in the CPU.
If an instruction processing error occurs during
execution in the CPU, the return value is undetermined.
 Available Devices
Arguments/
Return
Value
s
Prefix
X
Y
I
E
L
M
W





L











W






L











T
C
D
B
F
W
Z
R
V
H
A
U






































































D
F
E
Return
value
D
F
E











P





 Step Counts
Prefix
Step Count*1
W
12
L
12
D
15
F
9
E
10
*1: In addition, 21 steps are used for each script instruction.
IM 34M06Q16-04E
3rd Edition: Dec. 25, 2013-00