Skip to main content
Documentation home page
Search...
⌘K
Support
Console
Console
Search...
Navigation
Documentation
API Reference
MMQL
MMQL Queries
Overview
MMQL Operators
Operators
Logical Operators
Comparison Operators
Arithmetic Operators
Add
Subtract
Multiply
Divide
Mod
Abs
Ceil
Exp
Floor
Log
Pow
Round
Sqrt
Trunc
Min
Max
Aggregation Operators
Bitwise Operators
String Operators
Time/Date Operators
Array Operators
Object Operators
Value Checking Operators
Type Conversion Operators
Conditional Operators
Random Operator
Math Operators
UUID and Hash Operators
Constant Operators
Block Operators
Input Operator
On this page
$abs
Input
Output
Examples
Positive Number
Negative Number
Field Value
Arithmetic Operators
Abs
$abs
The
$abs
operator returns the absolute value of a number.
Input
A single numeric value
Output
The absolute value of the input
Examples
Positive Number
Copy
{
"$abs"
: [
5
]
}
Result:
5
Negative Number
Copy
{
"$abs"
: [
-3.5
]
}
Result:
3.5
Field Value
Copy
{
"$abs"
: [
{
"$input"
:
"temperature_change"
}
]
}
Result: The absolute value of the temperature_change field
Mod
Ceil
⌘I