Skip to content
Try Kata

native.I128

Native methods on I128.

All modules · Writing docstrings

func to_int(self: I128): Int

Convert to an arbitrary-precision Int without losing value.

func hash(self: I128): U64

Return the runtime hash. Hash values are not a stable serialization format.

func band(self: I128, other: I128): I128

Apply bitwise & to two values of the same fixed-width integer type.

func ior(self: I128, other: I128): I128

Apply bitwise | to two values of the same fixed-width integer type.

func xor(self: I128, other: I128): I128

Apply bitwise ^ to two values of the same fixed-width integer type.

func inv(self: I128): I128

Invert every bit, retaining the same fixed-width integer type.

func shl(self: I128, count: Int): I128

Shift by a nonnegative count representable as U32. The count wraps modulo the integer width; signed right shifts extend the sign bit.

func shr(self: I128, count: Int): I128

Shift by a nonnegative count representable as U32. The count wraps modulo the integer width; signed right shifts extend the sign bit.