Square Root
easy
Outputs the square root of a REAL input's magnitude.
What it teaches
Use SQRT on a REAL value. Negative inputs do not fault: SQRT roots the magnitude, so SQRT(-9) gives 3. Most roots are fractional: SQRT(2) is approximately 1.4142135.
Inputs and outputs
| Tag | Type | Default | Description |
|---|---|---|---|
| In_Value | REAL | 9 | Value to take the square root of |
| Out_Root | REAL | — | Square root of the input's magnitude |
Required behavior
- Out_Root is the square root of ABS(In_Value) every scan.
- A negative In_Value does not fault: Out_Root is the square root of its magnitude, so -9 gives 3.
- Out_Root is 0 when In_Value is 0.