Trigonometric operators
FuseQL supports the following trigonometric functions for use in mathematical and scientific queries.
acos
Returns the arccosine (inverse cosine) of a number, in radians. The input must be in the range [-1, 1]. Use acos to recover an angle from a precomputed cosine value — for example, when computing angular separation between directions stored in log data.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Required |
A numeric field name or literal in the range |
|
Required |
Output column name for the result, in radians. |
Example
Compute the arccosine of a fixed value to verify the trigonometric identity: acos(0.5) is π/3 radians (60°).
source="nginx"
| timeslice 1h
| count as requests by _timeslice
| acos(0.5) as angle_rad
| _timeslice | angle_rad |
|---|---|
2026-06-27 18:00:00 UTC |
1.0472 |
2026-06-27 19:00:00 UTC |
1.0472 |
|
|
asin
Returns the arcsine (inverse sine) of a number, in radians. The input must be in the range [-1, 1]. Use asin to recover an angle from a precomputed sine value — for example, when processing normalized coordinates or bearing data stored in structured logs.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Required |
A numeric field name or literal in the range |
|
Required |
Output column name for the result, in radians. |
Example
Compute the arcsine of 0.5 to illustrate the result: asin(0.5) is π/6 radians (30°).
source="nginx"
| timeslice 1h
| count as requests by _timeslice
| asin(0.5) as angle_rad
| _timeslice | angle_rad |
|---|---|
2026-06-27 18:00:00 UTC |
0.5236 |
2026-06-27 19:00:00 UTC |
0.5236 |
|
|
atan
Returns the arctangent (inverse tangent) of a number, in radians. The result is always in the range (-π/2, π/2). Unlike asin and acos, atan accepts any real-valued input. Use atan to recover an angle from a slope or ratio stored in log data.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Required |
A numeric field name or literal value. Accepts any real number; no domain restriction. |
|
Required |
Output column name for the result, in radians. |
Example
Compute the arctangent of 1.0 — which is π/4 radians (45°) — to illustrate the result.
source="nginx"
| timeslice 1h
| count as requests by _timeslice
| atan(1.0) as angle_rad
| _timeslice | angle_rad |
|---|---|
2026-06-27 18:00:00 UTC |
0.7854 |
2026-06-27 19:00:00 UTC |
0.7854 |
|
|
cos
Returns the cosine of a number given in radians. The result is always in the range [-1, 1]. Use cos when transforming polar or angular coordinates stored in log fields into Cartesian components for distance or similarity calculations.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Required |
A numeric field name or literal value, interpreted as radians. |
|
Required |
Output column name for the result. |
Example
Compute cos(0) — which equals 1.0 — and cos(3.14159) — which equals approximately -1.0 — to illustrate the function range.
source="nginx"
| timeslice 1h
| count as requests by _timeslice
| cos(0) as cos_0, cos(3.14159) as cos_pi
| _timeslice | cos_0 | cos_pi |
|---|---|---|
2026-06-27 18:00:00 UTC |
1.0 |
-1.0 |
2026-06-27 19:00:00 UTC |
1.0 |
-1.0 |
|
|
cosh
Returns the hyperbolic cosine of a number. cosh(x) is defined as (e^x + e^(-x)) / 2 and is always ≥ 1. Use cosh in signal-processing or physics-based computations applied to log-derived numeric fields.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Required |
A numeric field name or literal value. |
|
Required |
Output column name for the result. |
Example
Compute cosh(0) — which equals 1.0 — to confirm the identity.
source="nginx"
| timeslice 1h
| count as requests by _timeslice
| cosh(0) as cosh_0
| _timeslice | cosh_0 |
|---|---|
2026-06-27 18:00:00 UTC |
1.0 |
2026-06-27 19:00:00 UTC |
1.0 |
|
|
sin
Returns the sine of a number given in radians. The result is always in the range [-1, 1]. Use sin when transforming polar or angular log fields into vertical Cartesian components.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Required |
A numeric field name or literal value, interpreted as radians. |
|
Required |
Output column name for the result. |
Example
Compute sin(0) — which equals 0.0 — and sin(1.5708) — which equals approximately 1.0 (sin of π/2) — to illustrate the function range.
source="nginx"
| timeslice 1h
| count as requests by _timeslice
| sin(0) as sin_0, sin(1.5708) as sin_halfpi
| _timeslice | sin_0 | sin_halfpi |
|---|---|---|
2026-06-27 18:00:00 UTC |
0.0 |
1.0 |
2026-06-27 19:00:00 UTC |
0.0 |
1.0 |
|
|
sinh
Returns the hyperbolic sine of a number. sinh(x) is defined as (e^x − e^(-x)) / 2. The result can be any real number and grows rapidly for large inputs. Use sinh in physics or signal-processing computations applied to numeric fields extracted from logs.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Required |
A numeric field name or literal value. |
|
Required |
Output column name for the result. |
Example
Compute sinh(0) — which equals 0.0 — to confirm the identity.
source="nginx"
| timeslice 1h
| count as requests by _timeslice
| sinh(0) as sinh_0
| _timeslice | sinh_0 |
|---|---|
2026-06-27 18:00:00 UTC |
0.0 |
2026-06-27 19:00:00 UTC |
0.0 |
|
|
tan
Returns the tangent of a number given in radians. The result is undefined at multiples of π/2 (where the function diverges to ±infinity). Use tan when computing slopes or bearing angles derived from log-recorded direction fields.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Required |
A numeric field name or literal value, interpreted as radians. Avoid values at or very near π/2 multiples. |
|
Required |
Output column name for the result. |
Example
Compute tan(0) — which equals 0.0 — and tan(0.7854) — which equals approximately 1.0 (tangent of π/4 or 45°).
source="nginx"
| timeslice 1h
| count as requests by _timeslice
| tan(0) as tan_0, tan(0.7854) as tan_45deg
| _timeslice | tan_0 | tan_45deg |
|---|---|---|
2026-06-27 18:00:00 UTC |
0.0 |
1.0 |
2026-06-27 19:00:00 UTC |
0.0 |
1.0 |
|
|
tanh
Returns the hyperbolic tangent of a number. tanh(x) is defined as sinh(x) / cosh(x) and always returns a value in the range (-1, 1). Use tanh as a smooth sigmoidal squashing function to normalize unbounded metric fields into a bounded range without hard clipping.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Required |
A numeric field name or literal value. |
|
Required |
Output column name for the result. Always in the range |
Example
Compute tanh(0) — which equals 0.0 — to confirm the identity.
source="nginx"
| timeslice 1h
| count as requests by _timeslice
| tanh(0) as tanh_0
| _timeslice | tanh_0 |
|---|---|
2026-06-27 18:00:00 UTC |
0.0 |
2026-06-27 19:00:00 UTC |
0.0 |
|
|