series_exp
This page explains how to use the series_exp function in APL.
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.
Usage
Syntax
series_exp(array)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
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
Output
| 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] |
This query transforms logarithmic request durations back to their original linear scale, useful for analyzing actual performance metrics.
In OpenTelemetry traces, you can use series_exp to model exponential growth patterns in span durations or transform logarithmic latency data for analysis.
Query
Output
| service.name | log_durations | exp_durations |
|---|---|---|
| frontend | [6.2, 6.5, 6.8] | [492.7, 665.1, 897.9] |
| productcatalogservice | [5.8, 6.1, 6.4] | [330.3, 445.9, 601.8] |
This query transforms logarithmic span durations back to linear scale, useful for analyzing actual latency patterns across services.
In security logs, you can use series_exp to analyze exponential patterns in request frequencies or transform logarithmic attack intensity data.
Query
Output
| status | log_durations | exp_durations |
|---|---|---|
| 200 | [4.5, 5.0, 5.5] | [90.0, 148.4, 245.0] |
| 500 | [5.2, 5.7, 6.2] | [181.3, 298.9, 492.7] |
This query transforms logarithmic request durations back to linear scale grouped by status code, useful for analyzing actual performance patterns in different response types.
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.