long
Members list
Type members
Types
Remainder of the division of X
by Y
.
Remainder of the division of X
by Y
.
import compiletime.ops.long._
val mod: 5L % 2L = 1L
Attributes
Multiplication of two Long
singleton types.
Multiplication of two Long
singleton types.
import compiletime.ops.long._
val mul: 4L * 2L = 8L
Attributes
Addition of two Long
singleton types.
Addition of two Long
singleton types.
import compiletime.ops.long._
val sum: 2L + 2L = 4L
Attributes
Subtraction of two Long
singleton types.
Subtraction of two Long
singleton types.
import compiletime.ops.long._
val sub: 4L - 2L = 2L
Attributes
Integer division of two Long
singleton types.
Integer division of two Long
singleton types.
import compiletime.ops.long._
val div: 5L / 2L = 2L
Attributes
Less-than comparison of two Long
singleton types.
Less-than comparison of two Long
singleton types.
import compiletime.ops.long._
val lt1: 4L < 2L = false
val lt2: 2L < 4L = true
Attributes
Binary left shift of X
by Y
.
Binary left shift of X
by Y
.
import compiletime.ops.long._
val lshift: 1L << 2L = 4L
Attributes
Less-or-equal comparison of two Long
singleton types.
Less-or-equal comparison of two Long
singleton types.
import compiletime.ops.long._
val lt1: 4L <= 2L = false
val lt2: 2L <= 2L = true
Attributes
Greater-than comparison of two Long
singleton types.
Greater-than comparison of two Long
singleton types.
import compiletime.ops.long._
val gt1: 4L > 2L = true
val gt2: 2L > 2L = false
Attributes
Greater-or-equal comparison of two Long
singleton types.
Greater-or-equal comparison of two Long
singleton types.
import compiletime.ops.long._
val ge1: 4L >= 2L = true
val ge2: 2L >= 3L = false
Attributes
Binary right shift of X
by Y
.
Binary right shift of X
by Y
.
import compiletime.ops.long._
val rshift: 10L >> 1L = 5L
Attributes
Binary right shift of X
by Y
, filling the left with zeros.
Binary right shift of X
by Y
, filling the left with zeros.
import compiletime.ops.long._
val rshiftzero: 10L >>> 1L = 5L
Attributes
Absolute value of an Long
singleton type.
Absolute value of an Long
singleton type.
import compiletime.ops.long._
val abs: Abs[-1L] = 1L
Attributes
Bitwise and of X
and Y
.
Bitwise and of X
and Y
.
import compiletime.ops.long._
val and1: BitwiseAnd[4L, 4L] = 4L
val and2: BitwiseAnd[10L, 5L] = 0L
Attributes
Bitwise or of X
and Y
.
Bitwise or of X
and Y
.
import compiletime.ops.long._
val or: BitwiseOr[10L, 11L] = 11L
Attributes
Maximum of two Long
singleton types.
Maximum of two Long
singleton types.
import compiletime.ops.long._
val max: Max[-1L, 1L] = 1L
Attributes
Minimum of two Long
singleton types.
Minimum of two Long
singleton types.
import compiletime.ops.long._
val min: Min[-1L, 1L] = -1L
Attributes
Negation of an Long
singleton type.
Negation of an Long
singleton type.
import compiletime.ops.long._
val neg1: Negate[-1L] = 1L
val neg2: Negate[1L] = -1L
Attributes
Number of zero bits preceding the highest-order ("leftmost")
one-bit in the two's complement binary representation of the specified Long
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 specified Long
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] = 64
val eight_lzc: NumberOfLeadingZeros[8L] = 60
type Log2[N <: Long] = int.-[63, NumberOfLeadingZeros[N]]
val log2of8: Log2[8L] = 3
Attributes
Successor 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
}
Attributes
Double conversion of a Long
singleton type.
Double conversion of a Long
singleton type.
import compiletime.ops.long._
val x: ToDouble[1L] = 1.0
Attributes
Float conversion of a Long
singleton type.
Float conversion of a Long
singleton type.
import compiletime.ops.long._
val x: ToFloat[1L] = 1.0f
Attributes
Int conversion of a Long
singleton type.
Int conversion of a Long
singleton type.
import compiletime.ops.long._
val x: ToInt[1L] = 1