During each stage of the pipeline, we can apply one or more arithmetic operators to perform intermediate calculations. These operators are shown in the following list:
- $abs: This is the absolute value.
- $add: This can add numbers or a number to a date to get a new date.
- $ceil/$floor: These are the ceiling and floor functions, respectively.
- $divide: This is used to divide by two inputs.
- $exp: This raises the natural number e to the specified exponential power.
- $pow: This raises a number to the specified exponential power.
- $ln/$log/$log10: These are used to calculate the natural log, the log on a custom base, or a log base ten, respectively.
- $mod: This is the modular value.
- $multiply: This is used to multiply by inputs.
- $sqrt: This is the square root of the input.
- $subtract: This is the result of subtracting the second value from the first. If both arguments are dates, it returns the difference between them. If one argument is a date (this argument has to be the first argument) and the other is a number, it returns the resulting date.
- $trunc: This is used to truncate the result.