std/num/int64▲toc

64-bit signed integers.

.

fun (!=)( int64std/core/types/int64: V, int64std/core/types/int64: V ) : boolstd/core/types/bool: V
fun (%)( x : int64std/core/types/int64: V, y : int64std/core/types/int64: V ) : int64std/core/types/int64: V

Euclidean-0 modulus. See (/):(x : int64std/core/types/int64: V, y : int64std/core/types/int64: V) -> int64std/core/types/int64: V division for more information.

fun (*)( int64std/core/types/int64: V, int64std/core/types/int64: V ) : int64std/core/types/int64: V

Multiply two 64-bit integers.

fun (+)( int64std/core/types/int64: V, int64std/core/types/int64: V ) : int64std/core/types/int64: V
fun (-)( int64std/core/types/int64: V, int64std/core/types/int64: V ) : int64std/core/types/int64: V
fun (/)( x : int64std/core/types/int64: V, y : int64std/core/types/int64: V ) : int64std/core/types/int64: V

Euclidean-0 division. Euclidean division is defined as: For any D and d where d!=0 , we have:

  1. D == d*(D/d) + (D%d)
  2. D%d is always positive where 0 <= D%d < abs(d)

Moreover, Euclidean-0 is a total function, for the case where d==0 we have that D%0 == D and D/0 == 0 . So property (1) still holds, but not property (2). Useful laws that hold for Euclidean-0 division:

Note that an interesting edge case is min-int64std/num/int64/min-int64: int64 / -1 which equals min-int64std/num/int64/min-int64: int64 since in modulo 64-bit arithmetic min-int64std/num/int64/min-int64: int64 == -1 * min-int64std/num/int64/min-int64: int64 == -1 * (min-int64std/num/int64/min-int64: int64 / -1) + (min-int64std/num/int64/min-int64: int64 % -1) satisfying property (1). Of course (min-int64std/num/int64/min-int64: int64 + 1) / -1 is again positive (namely max-int64std/num/int64/max-int64: int64).

See also Division and modulus for computer scientists, Daan Leijen, 2001 pdf .

fun (<)( int64std/core/types/int64: V, int64std/core/types/int64: V ) : boolstd/core/types/bool: V
fun (<=)( int64std/core/types/int64: V, int64std/core/types/int64: V ) : boolstd/core/types/bool: V
fun (==)( int64std/core/types/int64: V, int64std/core/types/int64: V ) : boolstd/core/types/bool: V
fun (>)( int64std/core/types/int64: V, int64std/core/types/int64: V ) : boolstd/core/types/bool: V
fun (>=)( int64std/core/types/int64: V, int64std/core/types/int64: V ) : boolstd/core/types/bool: V
fun (^)( int64std/core/types/int64: V, int64std/core/types/int64: V ) : int64std/core/types/int64: V

Take the bitwise xor of two int64std/core/types/int64: Vs.

fun (~)( i : int64std/core/types/int64: V ) : totalstd/core/total: E int64std/core/types/int64: V

Negate an 64-bit integer.

fun abs( i : int64std/core/types/int64: V ) : exnstd/core/exn: HX int64std/core/types/int64: V

Return the absolute value of an integer. Raises an exception if the int64std/core/types/int64: V is min-int64std/num/int64/min-int64: int64 (since the negation of min-int64std/num/int64/min-int64: int64 equals itself and is still negative).

fun abs0( i : int64std/core/types/int64: V ) : int64std/core/types/int64: V

Return the absolute value of an integer. Returns 0 if the int64std/core/types/int64: V is min-int64std/num/int64/min-int64: int64 (since the negation of min-int64std/num/int64/min-int64: int64 equals itself and is still negative).

fun and( int64std/core/types/int64: V, int64std/core/types/int64: V ) : int64std/core/types/int64: V

Take the bitwise and of two int64std/core/types/int64: Vs.

val bits-int64: int64std/core/types/int64: V

The number of bits in an int64std/core/types/int64: V (always 64).

fun bool( i : int64std/core/types/int64: V ) : boolstd/core/types/bool: V

Convert an int64std/core/types/int64: V to a boolean.

fun cdiv( i : int64std/core/types/int64: V, j : int64std/core/types/int64: V ) : exnstd/core/exn: HX int64std/core/types/int64: V

Truncated division (as in C). See also (/):(x : int64std/core/types/int64: V, y : int64std/core/types/int64: V) -> int64std/core/types/int64: V.

fun cmod( i : int64std/core/types/int64: V, j : int64std/core/types/int64: V ) : exnstd/core/exn: HX int64std/core/types/int64: V

Truncated modulus (as in C). See also (%):(x : int64std/core/types/int64: V, y : int64std/core/types/int64: V) -> int64std/core/types/int64: V.

fun compare( x : int64std/core/types/int64: V, y : int64std/core/types/int64: V ) : orderstd/core/types/order: V
fun dec( i : int64std/core/types/int64: V ) : int64std/core/types/int64: V

Decrement a 64-bit integer.

fun divmod( x : int64std/core/types/int64: V, y : int64std/core/types/int64: V ) : (int64std/core/types/int64: V, int64std/core/types/int64: V)
fun double( i : int64std/core/types/int64: V ) : doublestd/core/types/double: V

Convert an 64-bit integer to a double.

fun fold-int64( start : int64std/core/types/int64: V, end : int64std/core/types/int64: V, init : a, f : (int64std/core/types/int64: V, a) -> e a ) : e a
fun inc( i : int64std/core/types/int64: V ) : int64std/core/types/int64: V

Increment a 64-bit integer.

fun int64( b : boolstd/core/types/bool: V ) : int64std/core/types/int64: V

Convert a boolean to an int64std/core/types/int64: V.

fun is-even( i : int64std/core/types/int64: V ) : boolstd/core/types/bool: V

Returns true if the integer i is an even number.

fun is-neg( i : int64std/core/types/int64: V ) : boolstd/core/types/bool: V
fun is-odd( i : int64std/core/types/int64: V ) : boolstd/core/types/bool: V

Returns true if the integer i is an odd number.

fun is-pos( i : int64std/core/types/int64: V ) : boolstd/core/types/bool: V
fun is-zero( i : int64std/core/types/int64: V ) : boolstd/core/types/bool: V
fun max( i : int64std/core/types/int64: V, j : int64std/core/types/int64: V ) : int64std/core/types/int64: V

Return the maximum of two integers.

val max-int64: int64std/core/types/int64: V

The maximal integer value before overflow happens.

fun min( i : int64std/core/types/int64: V, j : int64std/core/types/int64: V ) : int64std/core/types/int64: V

Return the minimum of two integers.

val min-int64: int64std/core/types/int64: V

The minimal integer value before underflow happens.

fun negate( i : int64std/core/types/int64: V ) : int64std/core/types/int64: V

Negate a 64-bit integer.

fun not( i : int64std/core/types/int64: V ) : int64std/core/types/int64: V

Bitwise not of an int64std/core/types/int64: V, i.e. flips all bits.

val one: int64std/core/types/int64: V
fun or( int64std/core/types/int64: V, int64std/core/types/int64: V ) : int64std/core/types/int64: V

Take the bitwise or of two int64std/core/types/int64: Vs.

fun rotl( i : int64std/core/types/int64: V, n : int64std/core/types/int64: V ) : int64std/core/types/int64: V

Bitwise rotate an int64std/core/types/int64: V n & 63 bits to the left.

fun rotr( i : int64std/core/types/int64: V, n : int64std/core/types/int64: V ) : int64std/core/types/int64: V

Bitwise rotate an int64std/core/types/int64: V n & 63 bits to the right.

fun sar( int64std/core/types/int64: V, int64std/core/types/int64: V ) : int64std/core/types/int64: V

Arithmetic shift an int64std/core/types/int64: V to the right by n & 63 bits. Preserves the sign bit.

fun shl( int64std/core/types/int64: V, int64std/core/types/int64: V ) : int64std/core/types/int64: V

Shift an int64std/core/types/int64: V i to the left by n & 63 bits.

fun show( i : int64std/core/types/int64: V ) : stringstd/core/types/string: V

Convert an int64std/core/types/int64: V to a string.

fun show-hex( i : int64std/core/types/int64: V, width : ?intstd/core/types/int: V, use-capitals : ?boolstd/core/types/bool: V, pre : ?stringstd/core/types/string: V ) : stringstd/core/types/string: V

Show an int64std/core/types/int64: V in hexadecimal notation The width parameter specifies how wide the hex value is where '0' is used to align.
The use-capitals parameter (= Truestd/core/types/True: bool) determines if captical letters should be used to display the hexadecimal digits.
The pre (="0x") is an optional prefix for the number (goes between the sign and the number).

fun show-hex64( i : int64std/core/types/int64: V, width : ?intstd/core/types/int: V, use-capitals : ?boolstd/core/types/bool: V, pre : ?stringstd/core/types/string: V ) : stringstd/core/types/string: V

Show an int64std/core/types/int64: V in hexadecimal notation interpreted as an unsigned 64-bit value. The width parameter specifies how wide the hex value is where '0' is used to align.
The use-capitals parameter (= Truestd/core/types/True: bool) determines if captical letters should be used to display the hexadecimal digits.
The pre (="0x") is an optional prefix for the number.

fun shr( int64std/core/types/int64: V, int64std/core/types/int64: V ) : int64std/core/types/int64: V

Logical shift an int64std/core/types/int64: V to the right by n & 63 bits. Shift in zeros from the left.

fun sign( i : int64std/core/types/int64: V ) : orderstd/core/types/order: V
fun uint( i : int64std/core/types/int64: V ) : intstd/core/types/int: V

Convert an int64std/core/types/int64: V to an intstd/core/types/int: V but interpret the int64std/core/types/int64: V as a 64-bit unsigned value.

fun uint64( i : intstd/core/types/int: V ) : int64std/core/types/int64: V

Convert an intstd/core/types/int: V to int64std/core/types/int64: V but interpret the int as an unsigned 64-bit value. i is clamped between 0 and 0xFFFFFFFFFFFFFFFF.
0x7FFFFFFFFFFFFFFF.uint64std/num/int64/uint64: (i : int) -> int64 == 0x7FFFFFFFFFFFFFFF.int64 == max-int64std/num/int64/max-int64: int64
0x8000000000000000.uint64std/num/int64/uint64: (i : int) -> int64 == -0x800000000000000.int64 == min-int64std/num/int64/min-int64: int64
0xFFFFFFFFFFFFFFFF.uint64std/num/int64/uint64: (i : int) -> int64 == -1.int64.

val zero: int64std/core/types/int64: V
private import std/core/typesstd/core/types, std/core/hndstd/core/hnd, std/corestd/core