asin function in APL to compute the arc sine (inverse sine) of a numeric expression. The function returns the angle, in radians, whose sine equals the input value. The input must be in the range [-1, 1]; values outside this range return null.
asin is useful when you work with normalized ratios or rates and need to map them to angular values. For example, you can use asin to encode success or error rates as phase angles for cyclic signal analysis.
For users of other query languages
If you come from other query languages, this section explains how to adjust your existing queries to achieve the same results in APL.Splunk SPL users
Splunk SPL users
In Splunk SPL,
asin() is available in the eval command with the same behavior: it returns the arc sine in radians for an input in [-1, 1].ANSI SQL users
ANSI SQL users
In ANSI SQL,
ASIN() is a standard mathematical function. It accepts a value in [-1, 1] and returns the arc sine in radians.Usage
Syntax
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
x | real | Yes | A real number in the range [-1, 1]. |
Returns
- The arc sine of
xin radians, in the range [-π/2, π/2]. nullifx< -1 orx> 1.
Example
Useasin to compute the arcsine of a value and return the angle in radians.
Query
| result |
|---|
| 0.5236 |
List of related functions
- acos: Returns the arc cosine. Use it when the cosine encoding is more appropriate for your data.
- atan: Returns the arc tangent. Use it when the input is not bounded to [-1, 1].
- sin: Returns the sine. Use it to apply the forward transformation before using
asinas the inverse. - radians: Converts degrees to radians. Use it if your angle data is in degrees before passing it to
asin. - degrees: Converts radians to degrees. Use it to convert the
asinresult into degrees.