Operators
GBOML provides the following operators for elementary floating-point arithmetic, which are listed in order of decreasing precedence:
Exponentiation: \(\texttt{**}\)
Multiplication: \(\texttt{*}\) and Division: \(\texttt{/}\)
Addition: \(\texttt{+}\) and Subtraction: \(\texttt{-}\)
Operator precedence can be overridden by using parentheses \(\texttt{(}\) and \(\texttt{)}\). Besides these elementary arithmetic operators, GBOML provides the modulo operator and the sum operator as native functions:
Modulo: \(\texttt{mod(<dividend>, <divisor>)}\)
Sum: \(\texttt{sum(<expression> for <id> in [<start>: <end>])}\)
In addition, a set of comparison operators are available in the language:
Equal to: \(\texttt{==}\)
Not equal to: \(\texttt{!=}\)
Less than or equal to: \(\texttt{<=}\)
Greater than or equal to: \(\texttt{>=}\)
Less than: \(\texttt{<}\)
Greater than: \(\texttt{>}\)
Finally, a set of logical operators are available, listed below in order of decreasing precedence:
Negation: \(\texttt{not}\)
Conjunction: \(\texttt{and}\)
Disjunction: \(\texttt{or}\)
Note that the precedence of logical operators can also be overriden by using parentheses.