Calculates the sine of 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:sin("value")
and:
logscale Syntaxmath:sin(field="value")
These examples show basic structure only.
math:sin()
Examples
Click
next to an example below to get the full details.Calculate Sine of a Value
Compute trigonometric sine using the
math:sin()
function
Query
myvalue := 345
| math:sin(myvalue, as=mathvalue)
Introduction
In this example, the math:sin()
function is used to
calculate the sine of a positive value, demonstrating how the function
handles standard input.
Step-by-Step
Starting with the source repository events.
- logscale
myvalue := 345
Assigns the positive value
345
to a variable named myvalue for use in subsequent calculations. - logscale
| math:sin(myvalue, as=mathvalue)
Calculates the sine of the value in the myvalue field and returns the result in a new field named mathvalue. The
math:sin()
function automatically handles the conversion of the input value to radians and returns a value between -1 and 1. Event Result set.
Summary and Results
The query is used to calculate the sine of a positive angle value, demonstrating basic trigonometric calculations.
This query is useful, for example, to analyze periodic data, process angular measurements, or calculate wave functions in scientific applications.
Sample output from the incoming example data:
mathvalue |
---|
-0.9589243 |
Note that the sine value for 345 radians is the exact opposite of the
sine of -345 radians, demonstrating the odd symmetry property of the
sine function where sin(-x) = -sin(x)
.