Excerpt |
---|
Computes the tangent of an input value for an angle measured in radians. The value can be a Decimal or Integer literal or a reference to a column containing numeric values. |

In the above, the tangent of angle A is computed as the following:
The cotangent of angle A is 1/tan(A), or:
Code Block |
---|
cot(A) = 1/tan(A) = y/x |
You can convert from degrees to radians. For more information, see RADIANS Function.
Numeric literal example:
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value: round(tan(radians(30)),3) |
---|
|
round(tan(radians(30)),3) |
Output: Returns the computation of the tangent of a 30-degree angle, which is converted to radians before being passed to the tan
function. The output value is rounded to three decimals: 0.577
.
Column reference example:
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value: tan(X) as: 'tanX' |
---|
|
tan(X) |
Output: Returns the tangent of the radians values in X
column.
D lang syntax |
---|
RawWrangle | true |
---|
Type | syntax |
---|
showNote | true |
---|
WrangleText | derive type:single value: tan(numeric_value) |
---|
|
tan(numeric_value) |
Argument | Required? | Data Type | Description |
---|
numeric_value | Y | string, decimal, or integer | Name of column, Decimal or Integer literal, or function returning those types to apply to the function |
numeric_value
Name of the column, Integer or Decimal literal, or function returning that data type to apply to the function.
- Missing input values generate missing results.
- Literal numeric values should not be quoted. Quoted values are treated as strings.
- Multiple columns and wildcards are not supported.
Required? | Data Type | Example Value |
---|
Yes | String (column reference) or Integer or Decimal literal | 0.5 |
Example - Trigonometry functions
Include Page |
---|
| EXAMPLE - Trigonometry Functions |
---|
| EXAMPLE - Trigonometry Functions |
---|
|