%) operator allows you to get the remainder after dividing the first operand with the second operand.
mod()function as well as
modoperators (I'll just reference
%for the rest of this article).
mod()output a remainder, their output values will take the sign (
+/-) of the dividend.
mod()will treat it as a negative integer natively.
%operator, you'll need to wrap your divisor in parentheses
()in order to explicitly define your divisor as a negative integer.
x % (-y)will work exactly like
x % -ywill cause Notion to rewrite your formula as
x / 100 - y, which will output an incorrect result. This is because the
-is treated as a unaryMinus operator, and Notion's math engine can't correctly deal with it when it's appended to the divisor.
+/-). If their signs differ, however, the modulus will differ from the remainder.
-19 mod 12results in
((x % y) + y) % yinstead: