Package-level declarations

Types

Link copied to clipboard
class UInt128(val upper: ULong, val lower: ULong) : Comparable<UInt128>

Represents a 128-bit unsigned integer.

Link copied to clipboard
abstract class UInt128Iterator : Iterator<UInt128>

An iterator over a sequence of values of type UInt128.

Link copied to clipboard

A progression of values of type UInt128.

Link copied to clipboard

A range of values of type UInt128.

Functions

Link copied to clipboard

Counts the number of consecutive most significant bits that are zero in the binary representation of this UInt128 number.

Link copied to clipboard
inline fun UInt128.countOneBits(): Int

Counts the number of set bits in the binary representation of this UInt128 number.

Link copied to clipboard

Counts the number of consecutive least significant bits that are zero in the binary representation of this UInt128 number.

Link copied to clipboard

Get the floor value of the exact square root of this

Link copied to clipboard

Raises this value to the integer power n

Link copied to clipboard
inline fun UInt128.rotateLeft(bitCount: Int): UInt128

Rotates the binary representation of this UInt128 number left by the specified bitCount number of bits. The most significant bits pushed out from the left side reenter the number as the least significant bits on the right side.

Link copied to clipboard
inline fun UInt128.rotateRight(bitCount: Int): UInt128

Rotates the binary representation of this UInt128 number right by the specified bitCount number of bits. The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side.

Link copied to clipboard

Returns a progression that goes over the same range with the given step.

Link copied to clipboard

Returns a number having a single bit set in the position of the most significant set bit of this UInt128 number, or zero, if this number is zero.

Link copied to clipboard

Returns a number having a single bit set in the position of the least significant set bit of this UInt128 number, or zero, if this number is zero.

Link copied to clipboard
fun UInt128.toString(radix: Int): String

Returns a string representation of this UInt128 value in the specified radix.

Link copied to clipboard
inline fun Byte.toUInt128(): UInt128

Converts this Byte value to UInt128.

inline fun Int.toUInt128(): UInt128

Converts this Int value to UInt128.

inline fun Long.toUInt128(): UInt128

Converts this Long value to UInt128.

inline fun Short.toUInt128(): UInt128

Converts this Short value to UInt128.

Parses the string as a UInt128 number and returns the result.

inline fun UByte.toUInt128(): UInt128

Converts this UByte value to UInt128.

inline fun UInt.toUInt128(): UInt128

Converts this UInt value to UInt128.

inline fun ULong.toUInt128(): UInt128

Converts this ULong value to UInt128.

inline fun UShort.toUInt128(): UInt128

Converts this UShort value to UInt128.

Link copied to clipboard

Parses the string as an ULong number and returns the result or null if the string is not a valid representation of a number.

Link copied to clipboard

Returns a range from this value up to but excluding the specified to value.