Package avail.interpreter.primitive.integers

Types

Link copied to clipboard
object P_BitShiftLeft : Primitive

Primitive: Given any integer B, and a shift factor S, compute ⌊B×2S⌋. This is the left-shift operation, but when S is negative it acts as a right-shift.

Link copied to clipboard
object P_BitShiftRight : Primitive

Primitive: Given any integer B, and a shift factor S, compute ⌊B÷2S⌋. This is the right-shift operation, but when S is negative it acts as a left-shift.

Link copied to clipboard
object P_BitShiftWithTruncation : Primitive

Primitive: Given a positive integer B, a shift factor S, and a truncation bit count T, shift B to the left by S bits (treating a negative factor as a right shift), then truncate the result to the bottom T bits by zeroing the rest.

Link copied to clipboard
object P_BitTest : Primitive

Primitive: Given an integer and a whole number, use the whole number to index a bit from the integer's 2's complement representation, and return it as a boolean.

Link copied to clipboard
object P_BitwiseAnd : Primitive

Primitive: Compute the bitwise AND of the arguments.

Link copied to clipboard
object P_BitwiseOr : Primitive

Primitive: Compute the bitwise OR of the arguments.

Link copied to clipboard
object P_BitwiseXor : Primitive

Primitive: Compute the bitwise EXCLUSIVE OR of the arguments.

Link copied to clipboard
object P_CreateIntegerRange : Primitive

Primitive: Answer the integer range constrained by the specified upper and lower bounds. The provided booleans indicate whether their corresponding bounds are inclusive (true) or exclusive (false).

Link copied to clipboard
object P_LowerBound : Primitive

Primitive: Answer the lower bound. The client can ask the integer range if it includes the answer to determine whether it is inclusive or exclusive.

Link copied to clipboard
object P_UpperBound : Primitive

Primitive: Answer the upper bound. The client can ask the integer range if it includes the answer to determine whether it is inclusive or exclusive.