long
Attributes
- Source
- long.scala
- Graph
-
- Supertypes
- Self type
-
long.type
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
- Source
- long.scala
Multiplication of two Long
singleton types.
Multiplication of two Long
singleton types.
import compiletime.ops.long._
val mul: 4L * 2L = 8L
Attributes
- Source
- long.scala
Addition of two Long
singleton types.
Addition of two Long
singleton types.
import compiletime.ops.long._
val sum: 2L + 2L = 4L
Attributes
- Source
- long.scala
Subtraction of two Long
singleton types.
Subtraction of two Long
singleton types.
import compiletime.ops.long._
val sub: 4L - 2L = 2L
Attributes
- Source
- long.scala
Integer division of two Long
singleton types.
Integer division of two Long
singleton types.
import compiletime.ops.long._
val div: 5L / 2L = 2L
Attributes
- Source
- long.scala
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
- Source
- long.scala
Binary left shift of X
by Y
.
Binary left shift of X
by Y
.
import compiletime.ops.long._
val lshift: 1L << 2L = 4L
Attributes
- Source
- long.scala
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
- Source
- long.scala
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
- Source
- long.scala
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
- Source
- long.scala
Binary right shift of X
by Y
.
Binary right shift of X
by Y
.
import compiletime.ops.long._
val rshift: 10L >> 1L = 5L
Attributes
- Source
- long.scala
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
- Source
- long.scala
Absolute value of an Long
singleton type.
Absolute value of an Long
singleton type.
import compiletime.ops.long._
val abs: Abs[-1L] = 1L
Attributes
- Source
- long.scala
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
- Source
- long.scala
Bitwise or of X
and Y
.
Bitwise or of X
and Y
.
import compiletime.ops.long._
val or: BitwiseOr[10L, 11L] = 11L
Attributes
- Source
- long.scala
Maximum of two Long
singleton types.
Maximum of two Long
singleton types.
import compiletime.ops.long._
val max: Max[-1L, 1L] = 1L
Attributes
- Source
- long.scala
Minimum of two Long
singleton types.
Minimum of two Long
singleton types.
import compiletime.ops.long._
val min: Min[-1L, 1L] = -1L
Attributes
- Source
- long.scala
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
- Source
- long.scala
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
- Source
- long.scala
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
- Source
- long.scala
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
- Source
- long.scala
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
- Source
- long.scala
Int conversion of a Long
singleton type.
Int conversion of a Long
singleton type.
import compiletime.ops.long._
val x: ToInt[1L] = 1
Attributes
- Source
- long.scala
Bitwise xor of X
and Y
.
Bitwise xor of X
and Y
.
import compiletime.ops.long._
val xor: 10L ^ 30L = 20L
Attributes
- Source
- long.scala