Skip to content

Numbers

Use this when doing arithmetic, comparisons, aggregation, or numeric conversions.

OperatorDescriptionExampleResult
+Add+3 47
-Subtract-10 37
*Multiply*3 412
/Divide/10 25
%Modulo%10 31
OperatorDescriptionExample
==Equal==a b
!=Not equal!=a b
>Greater than>a b
<Less than<a b
>=Greater or equal>=a b
<=Less or equal<=a b

All comparisons return b.

OperatorDescriptionExample
&Logical AND&a b
|Logical OR|a b
!Logical NOT!a
FunctionSignatureDescriptionExample
absn > nAbsolute valueabs -5 -> 5
flrn > nFloorflr 3.7 -> 3
celn > nCeilingcel 3.2 -> 4
roun > nRound to nearest integer (banker’s rounding)rou 3.7 -> 4
rnd> nRandom float in [0, 1). Aliases: rand, random. Read this as random, not round; for rounding use rou.rnd -> 0.42…
rndn n > nRandom integer in [a, b] inclusivernd 1 6 -> dice
FunctionSignatureDescriptionExample
sumL n > nSum a list of numberssum [1,2,3] -> 6
avgL n > nAverage of a list of numbersavg [2,4,6] -> 4
minL n > nMinimum element of a numeric list (error if empty)min [3,1,4,1,5] -> 1
maxL n > nMaximum element of a numeric list (error if empty)max [3,1,4,1,5] -> 5
minn n > nMinimum of two numbersmin 3 7 -> 3
maxn n > nMaximum of two numbersmax 3 7 -> 7
medianL n > nMedian of a numeric listmedian [1,2,3,4,5] -> 3
stdevL n > nSample standard deviation (divides by N-1)stdev [2,4,4,4,5,5,7,9]
varianceL n > nSample variance (divides by N-1)variance [...]
FunctionSignatureDescriptionExample
str_ > tConvert to stringstr 42 -> "42"
numt > nParse string to numbernum "42" -> 42
Long formShort form
averageavg
floorflr
ceilcel
roundrou
randomrnd
randrnd
numbernum
stringstr