13.2
Calculating the Square Root
SQRT
These functions calculate the square root of an input value.
Structured text
d:=SQRT(s);
Setting data
■Description, type, data type
Argument
Description
s (IN)
Input
d
Output
Processing details
■Operation processing
• These functions calculate the square root of the REAL/LREAL data type value input to (s) and store the operation result in
(d).
• When the input value is defined as A and the output value is defined as B, the relationship of A and B will be as follows:
B = √A
• Input a positive REAL/LREAL data type value to (s).
■Operation result
The operation processing is performed. The operation result is output from (d).
Operation error
Error code
Description
3405H
The input value is negative.
Type
Data type
Input variable
ANY_REAL
Output variable
ANY_REAL
13 SINGLE VARIABLE FUNCTIONS
13.2 Calculating the Square Root
13
167