# (Number)

The number type in Rax is denoted by the # symbol and is similar to the int type in C, with the difference that Rax numbers are always 64 bit. A variable of type # can thus contain integer numbers from the following range:

    −9,223,372,036,854,775,808 .. 9,223,372,036,854,775,807
         

Rax does not have an unsigned type.

Rax has a pretty standard set of operators defined on the #. A summary of all these operators you can find below.

Table 3.2. Operators defined on #

Operator nameSyntaxExplanation
Arithmetic operators
Assignment a := b  
Addition a + b  
Subtraction a - b  
Unary plus +a  
Unary minus -a  
Magnitude value #a  
Multiplication a * b  
Division a / b This is an integer division. If a is not divisible by b then the result is rounded down.
Modulo a % b  
Power a ** b  
Binary floor a :\ b Returns the smallest multiple of b greater than or equal to a. For example: 7 :\ 3 == 6
Binary ceiling a :/ b Returns the greatest multiple of b smaller than or equal to a. For example: 7 :/ 3 == 9
Bitwise operators
Bitwise not ~a  
Bitwise and a & b  
Bitwise or a | b  
Bitwise xor a ^ b  
Bitwise left shift a << b  
Bitwise right shift a >> b  
Comparison operators
Equal to a == b  
Not equal to a != b  
Greater than a > b  
Less than a < b  
Greater than or equal to a >= b  
Less than or equal to a <= b