Root
ActionStep Reference » Programming » Number Operation » Basic » Root
The ActionStep Root computes the nth root of a specified radicand and saves it under Result of the Result List. Only the Floating Point data type is allowed to be used for the number type.
- Open the Programming node in the Workspace Explorer.
- Open the Number Operation node.
- In the Basic node, select the Root ActionStep.
Parameters:
The ActionStep has the following input parameters:
name |
Description
|
---|---|
Number Type
|
Specifies the data type to be used for the root value of a number.
Allowed Context Scope [Fixed] Allowed Value [Floating Point] |
Radicand |
The number to get the root from.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Index |
The number specifying the exponent of the root.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Results:
The ActionStep returns the following results:
name
|
description
|
---|---|
Result |
Contains the root value of the number.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter] |
The number type set in the ActionStep Root determines the data type of its Result even if the variables and/or parameters that were set for Radicand and Index are of different data types. |
An index of 0 results in an infinite (∞) value.
|
Example 1 (Finds the root value of a variable):
This example computes the square root of a local variable, Stairway Run, that has the data type, Floating Point. The root value of the local variable is then output via Write Text.
See other Basic operations:
Add
Subtract
Multiplicate
Divide
Modulo
Power
Increment
Decrement
Random