Excerpt |
---|
Computes the value of the first argument raised to the value of the second argument. |
Each argument can be a Decimal or Integer literal or a reference to a column containing numeric values.
Numeric literal example:
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value: pow(10,3) |
---|
|
pow(10,3) |
Output: Returns the value of 10 3, which is 1000
.
Column reference example:
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value: pow(MyValue,2) as: 'sqred_MyValue' |
---|
|
pow(MyValue,2) |
Output: Returns the value of the MyValue
column raised to the power of 2 (squared).
D lang syntax |
---|
RawWrangle | true |
---|
Type | syntax |
---|
showNote | true |
---|
WrangleText | derive type:single value: pow(base_numeric_value, exp_numeric_value) |
---|
|
pow(base_numeric_value, exp_numeric_value) |
Argument | Required? | Data Type | Description |
---|
base_numeric_value | Y | string, decimal, or integer | Name of column or Decimal or Integer literal that is the base value to be raised to the power of the second argument |
exp_numeric_value | Y | string, decimal, or integer | Name of column or Decimal or Integer literal that is the power to which to raise the base value |
base_numeric_value
Name of the column or numeric literal whose values are used as the bases for the exponential computation.
- Missing input values generate missing results.
- Literal numeric values should not be quoted.
- Multiple columns and wildcards are not supported.
Required? | Data Type | Example Value |
---|
Yes | String (column reference) or Integer or Decimal literal | 2.3 |
exp_numeric_value
Name of the column or numeric literal whose values are used as the power to which the base-numeric value is raised.
- Missing input values generate missing results.
- Literal numeric values should not be quoted.
- Multiple columns and wildcards are not supported.
Required? | Data Type | Example Value |
---|
Yes | String (column reference) or Integer or Decimal literal | 5 |
Example - Exponential functions
Include Page |
---|
| EXAMPLE - Exponentional Functions |
---|
| EXAMPLE - Exponentional Functions |
---|
|
Example - Pythagorean Theorem
Include Page |
---|
| EXAMPLE - POW and SQRT Functions |
---|
| EXAMPLE - POW and SQRT Functions |
---|
|