3. Instructions
494
CS/CJ/NSJ Series Instructions Reference Manual (W474)
SQRT
Applicable Program Areas
Operands
z Operand Specifications
Flags
Instruction Mnemonic Variations
Function
code
Function
SQUARE ROOT SQRT @SQRT 466
Calculates the square root of a 32-bit floating-
point number and places the result in the specified
result words.
Symbol
SQRT
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or
transition programs
Usage OK OK OK OK OK OK
Operand Description Data type Size
S First source word REAL 2
R First result word REAL 2
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers
TK CF
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
S
OK OK OK OK OK OK OK OK OK OK
OK
--- --- OK --- --- --- ---
R ---
Name Label Operation
Error Flag ER • ON if the source data is not recognized as floating-point data.
• ON if the source data is negative.
• ON if the source data is not a number (NaN).
• OFF in all other cases.
Equals Flag = • ON if both the exponent and mantissa of the result are 0.
• OFF in all other cases.
Overflow Flag OF • ON if the absolute value of the result is too large to be expressed as a 32-bit floating-point value.
• OFF in all other cases.
Underflow Flag UF OFF
Negative Flag N OFF
S: First source word
R: First result word
SQRT(466)
S
R