Math Functions
Use math functions to perform math on numeric values.
You can replace any argument with a literal or an expression that evaluates to the argument. String literals must be enclosed in single or double quotation marks.
You can use the following data types with math functions:
- Double
- Float
- Integer
- Long
- StringNote: Data Collector parses a string as a Double value if the numeric value in a String field contains a dot ( . ). Otherwise, Data Collector parses the string as a Long value.
Some functions may not be valid in Data Collector Edge pipelines.
The expression language provides the following math functions:
- math:abs(<number>)
- Returns the absolute value, or positive version, of the argument. If the argument is already positive, returns the original number.
- math:ceil(<number>)
- Returns the smallest integer greater than or equal to the argument.
- math:floor (<number>)
- Returns the largest integer greater than or equal to the argument.
- math:max(<number1>, <number2>)
- Returns the greater of two arguments.
- math:min(<number1>, <number2>)
- Returns the lesser of two arguments.
- math:round(<number>)
- Returns the closest number to the argument, rounding up for ties.