Skip to main content
The series_asin function computes the arc sine (inverse sine) of each numeric element in a dynamic array. It returns a new array of the same length, where each element is the arc sine of the corresponding input element. The function is useful when you want to transform time series data or arrays of numeric values into angular measurements. This can help in advanced mathematical modeling, anomaly detection, and when working with normalized data that represents sine values. You use series_asin when you need to invert sine transformations stored in array form, for example, to reconstruct angular information from periodic signals or normalize log and trace metrics for statistical or geometric 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 doesn’t provide a direct equivalent of series_asin that operates over arrays. Instead, SPL typically requires you to apply asin() to individual fields or use mvmap to apply the function to multivalue fields. In APL, series_asin simplifies this by applying the operation to each element of a dynamic array in one step.
... | eval angle=mvmap(values, asin(x))
ANSI SQL databases generally provide ASIN() for scalar values but do not include native array-processing functions. You would need to unnest an array into rows, apply ASIN(), and then aggregate the results back into an array. APL’s series_asin eliminates this boilerplate by letting you compute the arc sine across the entire array at once.
SELECT array_agg(ASIN(x))
FROM UNNEST(ARRAY[0.0, 0.5, 1.0]) AS t(x);

Usage

Syntax

series_asin(array)

Parameters

ParameterTypeDescription
arraydynamicA dynamic array of numeric values. Each element should be between -1 and 1, the valid domain of the arc sine function.

Returns

A dynamic array of the same length as the input, where each element is the arc sine (in radians) of the corresponding input element.

Use case examples

  • Log analysis
  • OpenTelemetry traces
  • Security logs
When analyzing HTTP logs, you can normalize request durations to the range [-1, 1] and then apply series_asin to transform them into angular values for further statistical analysis.Query
['sample-http-logs']
| summarize durations = make_list(req_duration_ms, 5) by id
| extend normalized = series_divide(durations, 1000.0)
| extend angles = series_asin(normalized)
Run in PlaygroundOutput
iddurationsnormalizedangles
A12[100, 200, 300, 400, 500][0.1, 0.2, 0.3, 0.4, 0.5][0.100, 0.201, 0.305, 0.412, 0.524]
The query collects request durations per user ID, normalizes them, and applies series_asin to transform values into angles.
  • series_acos: Returns the arc cosine of each element in an array. Use when you need to invert cosine transformations instead of sine.
  • series_atan: Returns the arc tangent of each element in an array. Useful for handling tangent-derived data.
I