series_exp function calculates the exponential (e^x) of each element in a numeric dynamic array (series). This function applies the mathematical exponential transformation element-wise across the entire array, which is useful for mathematical modeling, growth analysis, and data transformation in time series data.
You can use series_exp when you want to apply exponential transformations to your data, such as modeling exponential growth patterns, converting logarithmic data back to linear scale, or applying mathematical transformations for machine learning preprocessing. Typical applications include financial modeling, population growth analysis, and signal processing.
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, exponential calculations are typically done with the
eval function and the exp() expression. To compute exponentials across multiple values, you usually need to expand arrays and apply the transformation row by row. In APL, series_exp works directly on dynamic arrays, making it efficient for series-wide exponential transformations.ANSI SQL users
ANSI SQL users
In SQL, exponential calculations use the
EXP() function, but this only works on single values, not arrays. To compute exponentials for array elements, you typically need to unnest arrays and apply EXP() row by row. In APL, series_exp eliminates this complexity by directly applying exponential transformation to each element in an array.Usage
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
array | dynamic | A dynamic array of numeric values. |
Returns
A dynamic array where each element is the exponential (e^x) of the corresponding input element.Use case examples
- Log analysis
- OpenTelemetry traces
- Security logs
In log analysis, you can use Run in PlaygroundOutput
This query transforms logarithmic request durations back to their original linear scale, useful for analyzing actual performance metrics.
series_exp to transform logarithmic request durations back to linear scale or model exponential growth patterns in user activity.Query| id | log_durations | exp_durations |
|---|---|---|
| u123 | [4.6, 5.0, 5.3] | [99.5, 148.4, 200.3] |
| u456 | [4.2, 4.8, 5.1] | [66.7, 121.5, 164.0] |
List of related functions
- series_abs: Returns the absolute value of each element in an array. Use when you need to normalize values before applying exponential transformations.
- series_cos: Returns the cosine of each element in an array. Use for trigonometric transformations instead of exponential.
- series_sin: Returns the sine of each element in an array. Use for periodic transformations instead of exponential growth.
- series_tan: Returns the tangent of each element in an array. Use for trigonometric transformations with different periodicity.
- series_floor: Returns the floor of each element in an array. Use for rounding down instead of exponential transformation.