Remainder of the division ofX byY.
Remainder of the division ofX byY.
import compiletime.ops.long.*val mod: 5L % 2L = 1LMultiplication of twoLong singleton types.
Multiplication of twoLong singleton types.
import compiletime.ops.long.*val mul: 4L * 2L = 8LAddition of twoLong singleton types.
Addition of twoLong singleton types.
import compiletime.ops.long.*val sum: 2L + 2L = 4LSubtraction of twoLong singleton types.
Subtraction of twoLong singleton types.
import compiletime.ops.long.*val sub: 4L - 2L = 2LInteger division of twoLong singleton types.
Integer division of twoLong singleton types.
import compiletime.ops.long.*val div: 5L / 2L = 2LLess-than comparison of twoLong singleton types.
Less-than comparison of twoLong singleton types.
import compiletime.ops.long.*val lt1: 4L < 2L = falseval lt2: 2L < 4L = trueBinary left shift ofX byY.
Binary left shift ofX byY.
import compiletime.ops.long.*val lshift: 1L << 2L = 4LLess-or-equal comparison of twoLong singleton types.
Less-or-equal comparison of twoLong singleton types.
import compiletime.ops.long.*val lt1: 4L <= 2L = falseval lt2: 2L <= 2L = trueGreater-than comparison of twoLong singleton types.
Greater-than comparison of twoLong singleton types.
import compiletime.ops.long.*val gt1: 4L > 2L = trueval gt2: 2L > 2L = falseGreater-or-equal comparison of twoLong singleton types.
Greater-or-equal comparison of twoLong singleton types.
import compiletime.ops.long.*val ge1: 4L >= 2L = trueval ge2: 2L >= 3L = falseBinary right shift ofX byY.
Binary right shift ofX byY.
import compiletime.ops.long.*val rshift: 10L >> 1L = 5LBinary right shift ofX byY, filling the left with zeros.
Binary right shift ofX byY, filling the left with zeros.
import compiletime.ops.long.*val rshiftzero: 10L >>> 1L = 5LAbsolute value of anLong singleton type.
Absolute value of anLong singleton type.
import compiletime.ops.long.*val abs: Abs[-1L] = 1LBitwise and ofX andY.
Bitwise and ofX andY.
import compiletime.ops.long.*val and1: BitwiseAnd[4L, 4L] = 4Lval and2: BitwiseAnd[10L, 5L] = 0LBitwise or ofX andY.
Bitwise or ofX andY.
import compiletime.ops.long.*val or: BitwiseOr[10L, 11L] = 11LMaximum of twoLong singleton types.
Maximum of twoLong singleton types.
import compiletime.ops.long.*val max: Max[-1L, 1L] = 1LMinimum of twoLong singleton types.
Minimum of twoLong singleton types.
import compiletime.ops.long.*val min: Min[-1L, 1L] = -1LNegation of anLong singleton type.
Negation of anLong singleton type.
import compiletime.ops.long.*val neg1: Negate[-1L] = 1Lval neg2: Negate[1L] = -1LNumber of zero bits preceding the highest-order ("leftmost") one-bit in the two's complement binary representation of the specifiedLong singleton type. Returns 64 if the specified singleton type has no one-bits in its two's complement representation, in other words if it is equal to zero.
Number of zero bits preceding the highest-order ("leftmost") one-bit in the two's complement binary representation of the specifiedLong singleton type. Returns 64 if the specified singleton type has no one-bits in its two's complement representation, in other words if it is equal to zero.
import compiletime.ops.long.*val zero_lzc: NumberOfLeadingZeros[0L] = 64val eight_lzc: NumberOfLeadingZeros[8L] = 60type Log2[N <: Long] = int.-[63, NumberOfLeadingZeros[N]]val log2of8: Log2[8L] = 3Double conversion of aLong singleton type.
Double conversion of aLong singleton type.
import compiletime.ops.long.*val x: ToDouble[1L] = 1.0Float conversion of aLong singleton type.
Float conversion of aLong singleton type.
import compiletime.ops.long.*val x: ToFloat[1L] = 1.0fInt conversion of aLong singleton type.
Int conversion of aLong singleton type.
import compiletime.ops.long.*val x: ToInt[1L] = 1Bitwise xor ofX andY.
Bitwise xor ofX andY.
import compiletime.ops.long.*val xor: 10L ^ 30L = 20LSuccessor of a natural number where zero is the type 0 and successors are reduced as if the definition was:
Successor of a natural number where zero is the type 0 and successors are reduced as if the definition was:
type S[N <: Long] <: Long = N match { case 0L => 1L case 1L => 2L case 2L => 3L // ... case 9223372036854775806L => 9223372036854775807L}[Since version 3.3.1]The Successor feature for `Long` never worked, and after careful consideration it was decided to not support it at all.