Companion

object Companion

Properties

Link copied to clipboard

The Avail integer negative one (-1).

Link copied to clipboard

An Avail integer representing one (1).

Link copied to clipboard

An Avail integer representing two (2).

Link copied to clipboard

An Avail integer representing zero (0).

Functions

Link copied to clipboard

Answer the nth successive square of a (U.S.) quintillion, which will be (10^18)^(2^n). N must be ≥ 0. Cache this number for performance.

Link copied to clipboard
fun computeHashOfInt(anInt: Int): Int

Hash the passed Int. Note that it must have the same value as what computeHashOfIntegerObject would return, given an encoding of the Int as an Avail integer.

Link copied to clipboard

Hash the passed Long. Note that it must have the same value as what computeHashOfIntegerObject would return, given an encoding of the Long as an Avail integer. Even if that integer is within the 32-bit Int range.

Link copied to clipboard

Create a mutable Avail integer with the specified number of uninitialized Int slots.

Link copied to clipboard
fun extractDoubleScaled(self: AvailObject, exponentBias: Int): Double

Extract a double from this integer, but scale it down by the specified power of two in the process. If the integer is beyond the scale of a double but the scale would bring it in range, don't overflow.

Link copied to clipboard

Create an Avail integer that is the numerical equivalent of the given Java BigInteger.

Link copied to clipboard
fun fromInt(anInteger: Int): AvailObject

Convert the specified Kotlin Int into an Avail integer.

Link copied to clipboard

Convert the specified Long into a boxed Avail integer.

Link copied to clipboard

Convert the specified byte-valued Java short into an Avail integer.

Link copied to clipboard
fun hashOfUnsignedByte(anInteger: Short): Int

Answer the Int hash value of the given Short in the range 0..255 inclusive.

Link copied to clipboard

Answer the number of int slots in the passed integer object, which must not be an indirection.

Link copied to clipboard

Answer an AvailObject representing the integer negative one (-1).

Link copied to clipboard

Answer an Avail integer that holds the truncation of the double argument, rounded towards zero.