Integer64 Type
The Integer64 primitive type represents the set of positive and negative whole numbers in the range -9,223,372,036,854,775,807 through 9,223,372,036,854,775,807. Any value of the Integer64 primitive type is therefore a whole number.
JADE defines a number of arithmetic operations that take Integer64 operators and return Integer64 results, as listed in the following table.
Operator | Description |
---|---|
+ | Add |
- | Subtract |
* | Multiply |
div | Integer division (division with truncation; for example, 7 div 3 = 2) |
^ | Exponentiation (for example, i ^ 3 is i cubed) |
mod | Modulus (remainder after integer division) |
These are binary (or dyadic) infix operators; that is, they are used with operands on both sides of the operator (for example, a+b). However, the + operator and - operator can also be used as unary (or monadic) prefix operators, as listed in the following table.
Unary Prefix Operator | Description |
---|---|
+a | Sign identify |
-a | Sign inversion |
The div operator (integer division) performs division with truncation; for example, 7 div 3 = 2.
For details about the methods defined in the Integer64 primitive type, see "Integer64 Methods", in the following subsection. For details about converting primitive types, see "