![]() | ![]() | ![]() |
|
Int64 provides support for operations on 64 bit integers, no matter how big native pointer is.
type t; | |
Type of 64 bit integers. |
t add(t a, t b); | |
Return a + b. |
t sub(t a, t b); | |
Return a - b. |
t mul(t a, t b); | |
Return a * b. |
t div(t a, t b); | |
Return a / b. Raise Invalid_argument if b == 0. |
t mod(t a, t b); | |
Return a % b (modulus). Raise Invalid_argument if b == 0. |
int cmp(t a, t b); | |
Return -1, 0 or 1 if a < b, a == b or a > b respectively. |
t of_string(string s); | |
Convert s, from string decimal representation to 64 bit int. Raise Invalid_argument if s is not valid integer literal. |
t of_int(int i); | |
Extend native integer i to 64 bit. |
string to_string(t a, int base); | |
Convert a to string using radix base. |
t succ(t a); | |
Return a + 1. |
t pred(t a); | |
Return a - 1. |
t zero; | |
Value of 0. |
t one; | |
Value of 1. |
t minus_one; | |
Value of -1. |