ULong

An unsigned 64-bit integer with values from zero through 18,446,744,073,709,551,615.

Integer arithmetic wraps on overflow. Division and remainder use unsigned magnitudes and throw ArithmeticException for a zero divisor. Shifts fill with zeros and mask the count to its lowest six bits. Signed conversions can reinterpret the high bit as a sign bit.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
infix external fun and(other: ULong): ULong

Returns the bitwise AND of this value and other.

Link copied to clipboard
operator external fun compareTo(other: UByte): Int
operator external fun compareTo(other: UInt): Int
open operator external override fun compareTo(other: ULong): Int
operator external fun compareTo(other: UShort): Int

Compares this value with other after numeric promotion.

Link copied to clipboard
operator external fun dec(): ULong

Returns this value minus one.

Link copied to clipboard
operator external fun div(other: UByte): ULong
operator external fun div(other: UInt): ULong
operator external fun div(other: ULong): ULong
operator external fun div(other: UShort): ULong

Divides this value by other.

Link copied to clipboard
infix fun ULong.downTo(other: UByte): ULongProgression
infix fun ULong.downTo(other: UInt): ULongProgression
infix fun ULong.downTo(other: ULong): ULongProgression
infix fun ULong.downTo(other: UShort): ULongProgression

Creates a descending progression from this value down to other, inclusive.

Link copied to clipboard
operator external fun inc(): ULong

Returns this value plus one.

Link copied to clipboard
external fun inv(): ULong

Inverts all 64 bits of this value.

Link copied to clipboard
operator external fun minus(other: UByte): ULong
operator external fun minus(other: UInt): ULong
operator external fun minus(other: ULong): ULong
operator external fun minus(other: UShort): ULong

Subtracts other from this value.

Link copied to clipboard
infix external fun or(other: ULong): ULong

Returns the bitwise OR of this value and other.

Link copied to clipboard
operator external fun plus(other: UByte): ULong
operator external fun plus(other: UInt): ULong
operator external fun plus(other: ULong): ULong
operator external fun plus(other: UShort): ULong

Adds other to this value.

Link copied to clipboard
operator fun ULong.rangeTo(other: UByte): ULongRange
operator fun ULong.rangeTo(other: UInt): ULongRange
operator fun ULong.rangeTo(other: ULong): ULongRange
operator fun ULong.rangeTo(other: UShort): ULongRange

Creates an ascending range from this value up to other, inclusive.

Link copied to clipboard
operator fun ULong.rangeUntil(other: UByte): ULongRange
operator fun ULong.rangeUntil(other: UInt): ULongRange
operator fun ULong.rangeUntil(other: ULong): ULongRange
operator fun ULong.rangeUntil(other: UShort): ULongRange

Creates an ascending range from this value up to other, exclusive.

Link copied to clipboard
operator external fun rem(other: UByte): ULong
operator external fun rem(other: UInt): ULong
operator external fun rem(other: ULong): ULong
operator external fun rem(other: UShort): ULong

Returns the remainder after dividing this value by other.

Link copied to clipboard
infix external fun shl(bitCount: Int): ULong

Shifts this value left, discarding bits that leave the value and filling low bits with zeros.

Link copied to clipboard
infix external fun shr(bitCount: Int): ULong

Shifts this value right, filling high bits with zeros.

Link copied to clipboard
operator external fun times(other: UByte): ULong
operator external fun times(other: UInt): ULong
operator external fun times(other: ULong): ULong
operator external fun times(other: UShort): ULong

Multiplies this value by other.

Link copied to clipboard
external fun toByte(): Byte

Converts this value to Byte.

Link copied to clipboard
external fun toDouble(): Double

Converts this value to Double.

Link copied to clipboard
external fun toFloat(): Float

Converts this value to Float.

Link copied to clipboard
external fun toInt(): Int

Converts this value to Int.

Link copied to clipboard
external fun toLong(): Long

Converts this value to Long.

Link copied to clipboard
external fun toShort(): Short

Converts this value to Short.

Link copied to clipboard
external fun toUByte(): UByte

Converts this value to UByte.

Link copied to clipboard
external fun toUInt(): UInt

Converts this value to UInt.

Link copied to clipboard
external fun toULong(): ULong

Returns this value unchanged.

Link copied to clipboard
external fun toUShort(): UShort

Converts this value to UShort.

Link copied to clipboard
infix fun ULong.until(other: UByte): ULongRange
infix fun ULong.until(other: UInt): ULongRange
infix fun ULong.until(other: ULong): ULongRange
infix fun ULong.until(other: UShort): ULongRange

Creates an ascending range from this value up to other, exclusive.

Link copied to clipboard
infix external fun xor(other: ULong): ULong

Returns the bitwise exclusive OR of this value and other.