Skip to main content
The 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.
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.
... | eval exp_val=exp(log_value)
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.
SELECT EXP(log_value) AS exp_val
FROM measurements;

Usage

Syntax

series_exp(array)

Parameters

ParameterTypeDescription
arraydynamicA 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 series_exp to transform logarithmic request durations back to linear scale or model exponential growth patterns in user activity.Query
['sample-http-logs']
| summarize log_durations = make_list(log(req_duration_ms)) by id
| extend exp_durations = series_exp(log_durations)
Run in PlaygroundOutput
idlog_durationsexp_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]
This query transforms logarithmic request durations back to their original linear scale, useful for analyzing actual performance metrics.
  • 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.