Columnal Documentation: Table of Contents

number functions

roundround decimalround significantabsaveragesum
round(decimal)rounded Type: For any units u(Number{u}) -> Number{u}

Rounds the given number to the nearest whole number (integer).

Numbers that end in .5 (which are halfway between two whole numbers) are rounded towards the nearest even number, sometimes known as banker's rounding.

ExamplesClick an example to insert it
round(0.333)0
round(2)2
round(0.5)1
round(1.5)2
round decimal(decimal, decimal places)rounded Type: For any units u(Number{u}, Number) -> Number{u}

Rounds the number to the given number of decimal places (digits after the decimal point).

ExamplesClick an example to insert it
round decimal(3.1415927, 2)3.14
round significant(decimal, significant figures)rounded Type: For any units u(Number{u}, Number) -> Number{u}

Rounds the number to the given number of significant figures (digits at the beginning of the number).

ExamplesClick an example to insert it
round significant(3.1415927, 2)3.1
round significant(1234567, 4)1235000
abs(original)positive Type: For any units u(Number{u}) -> Number{u}

Makes a number positive by discarding the minus sign.

ExamplesClick an example to insert it
abs(-3.6)3.6
abs(5)5
abs(0)0
average(numbers)average Type: For any units u([Number{u}]) -> Number{u}

Calculates the average of a list of numbers.

ExamplesClick an example to insert it
average([1, 1.5, 5])2.5
average([33.4])33.4
average([])error
sum(numbers)total Type: For any units u([Number{u}]) -> Number{u}

Calculates the sum (total) of a list of numbers.

ExamplesClick an example to insert it
sum([1, 1.5, 5])7.5
sum([33.4])33.4
sum([])0