Unary Mathematical Functions
HelixQL provides a rich set of single-argument mathematical functions for transforming numeric values, including absolute values, roots, logarithms, exponentials, and rounding operations.Available Functions
ABS - Absolute Value
SQRT - Square Root
LN - Natural Logarithm
LOG10 - Base-10 Logarithm
LOG - Custom Base Logarithm
EXP - Exponential
CEIL - Ceiling
FLOOR - Floor
ROUND - Round
Example 1: Distance calculations with SQRT
Calculate Euclidean distances between points:Example 2: Logarithmic scaling with LN and LOG10
Use logarithms for normalization and scaling:Example 3: Exponential decay with EXP
Model time-based decay using exponential functions:Rounding Functions
CEIL, FLOOR, and ROUND provide different rounding behaviors:Domain Restrictions
Some functions have domain restrictions:
- SQRT(x): x must be non-negative
- LN(x), LOG10(x), LOG(x, base): x must be positive
- LOG(x, base): base must be positive and not equal to 1
Use in Weight Calculations
Unary math functions are powerful in shortest path weight calculations:Related Topics
Arithmetic Functions
ADD, SUB, MUL, DIV, POW, MOD
Constants
PI and E constants
Custom Weights
Use in shortest path calculations
Math Overview
Overview of all math functions