Calculates the trigonometric tangent of an angle in a field.
Note
Math functions on ARM architecture may return different results in very high-precision calculationsc compared to Intel/AMD architectures.
Hide omitted argument names for this function
Omitted Argument NamesThe argument name for
field
can be omitted; the following forms of this function are equivalent:logscale Syntaxmath:tan("value")
and:
logscale Syntaxmath:tan(field="value")
These examples show basic structure only.
math:tan()
Examples
Click
next to an example below to get the full details.Calculate Tangent Values
Calculate tangent of angles in radians using the
math:tan()
function
Query
myvalue := 120
| math:tan(myvalue, as=tangent_value)
Introduction
In this example, the math:tan()
function is used to
calculate the tangent of an assigned value of 120
(interpreted as radians).
Step-by-Step
Starting with the source repository events.
- logscale
myvalue := 120
Assigns the value
120
to a field named myvalue. This creates a new field with a constant value that will be used for the tangent calculation. - logscale
| math:tan(myvalue, as=tangent_value)
Calculates the tangent of the value in the myvalue field and returns the result in a new field named tangent_value. Note that the input value is interpreted as radians, not degrees.
Event Result set.
Summary and Results
The query calculates the tangent of a fixed value of 120
radians
. Since tangent is a periodic function with period π
(approximately 3.14159), the result represents the equivalent angle
within one period.
This query is useful for performing consistent trigonometric calculations across events, testing specific angle values in radians, or adding reference trigonometric values to existing data.
Sample output from the incoming example data:
tangent_value |
---|
0.320 |