Expand description
Built-in numeric functions
Functions§
- abs
- $abs(number) - Absolute value
- average
- $average(array) - Average value
- ceil
- $ceil(number) - Ceiling
- floor
- $floor(number) - Floor
- format_
base - $formatBase(value, radix) - Convert number to string in specified base radix defaults to 10, must be between 2 and 36
- format_
number - $formatNumber(value, picture, options) - Format number with picture string Implements XPath F&O number formatting specification
- max
- $max(array) - Maximum value
- min
- $min(array) - Minimum value
- number
- $number(value) - Convert value to number Supports decimal, hex (0x), octal (0o), and binary (0b) formats
- power
- $power(base, exponent) - Power
- round
- $round(number, precision) - Round to precision using “round half to even” (banker’s rounding)
- sqrt
- $sqrt(number) - Square root
- sum
- $sum(array) - Sum array of numbers