long

object long
Source:
long.scala
class Object
trait Matchable
class Any
long.type

Type members

Types

type %[+X <: Long, +Y <: Long] <: Long

Remainder of the division of X by Y.

Remainder of the division of X by Y.

val mod: 5L % 2L = 1L
Source:
long.scala
type *[+X <: Long, +Y <: Long] <: Long

Multiplication of two Long singleton types.

Multiplication of two Long singleton types.

val mul: 4L * 2L = 8L
Source:
long.scala
type +[+X <: Long, +Y <: Long] <: Long

Addition of two Long singleton types.

Addition of two Long singleton types.

val sum: 2L + 2L = 4L
Source:
long.scala
type -[+X <: Long, +Y <: Long] <: Long

Subtraction of two Long singleton types.

Subtraction of two Long singleton types.

val sub: 4L - 2L = 2L
Source:
long.scala
type /[+X <: Long, +Y <: Long] <: Long

Integer division of two Long singleton types.

Integer division of two Long singleton types.

val div: 5L / 2L = 2L
Source:
long.scala
type <[+X <: Long, +Y <: Long] <: Boolean

Less-than comparison of two Long singleton types.

Less-than comparison of two Long singleton types.

val lt1: 4L < 2L = false
val lt2: 2L < 4L = true
Source:
long.scala
type <<[+X <: Long, +Y <: Long] <: Long

Binary left shift of X by Y.

Binary left shift of X by Y.

val lshift: 1L << 2L = 4L
Source:
long.scala
type <=[+X <: Long, +Y <: Long] <: Boolean

Less-or-equal comparison of two Long singleton types.

Less-or-equal comparison of two Long singleton types.

val lt1: 4L <= 2L = false
val lt2: 2L <= 2L = true
Source:
long.scala
type >[+X <: Long, +Y <: Long] <: Boolean

Greater-than comparison of two Long singleton types.

Greater-than comparison of two Long singleton types.

val gt1: 4L > 2L = true
val gt2: 2L > 2L = false
Source:
long.scala
type >=[+X <: Long, +Y <: Long] <: Boolean

Greater-or-equal comparison of two Long singleton types.

Greater-or-equal comparison of two Long singleton types.

val ge1: 4L >= 2L = true
val ge2: 2L >= 3L = false
Source:
long.scala
type >>[+X <: Long, +Y <: Long] <: Long

Binary right shift of X by Y.

Binary right shift of X by Y.

val rshift: 10L >> 1L = 5L
Source:
long.scala
type >>>[+X <: Long, +Y <: Long] <: Long

Binary right shift of X by Y, filling the left with zeros.

Binary right shift of X by Y, filling the left with zeros.

val rshiftzero: 10L >>> 1L = 5L
Source:
long.scala
type Abs[+X <: Long] <: Long

Absolute value of an Long singleton type.

Absolute value of an Long singleton type.

val abs: Abs[-1L] = 1L
Source:
long.scala
type BitwiseAnd[+X <: Long, +Y <: Long] <: Long

Bitwise and of X and Y.

Bitwise and of X and Y.

val and1: BitwiseAnd[4L, 4L] = 4L
val and2: BitwiseAnd[10L, 5L] = 0L
Source:
long.scala
type BitwiseOr[+X <: Long, +Y <: Long] <: Long

Bitwise or of X and Y.

Bitwise or of X and Y.

val or: BitwiseOr[10L, 11L] = 11L
Source:
long.scala
type Max[+X <: Long, +Y <: Long] <: Long

Maximum of two Long singleton types.

Maximum of two Long singleton types.

val max: Max[-1L, 1L] = 1L
Source:
long.scala
type Min[+X <: Long, +Y <: Long] <: Long

Minimum of two Long singleton types.

Minimum of two Long singleton types.

val min: Min[-1L, 1L] = -1L
Source:
long.scala
type Negate[+X <: Long] <: Long

Negation of an Long singleton type.

Negation of an Long singleton type.

val neg1: Negate[-1L] = 1L
val neg2: Negate[1L] = -1L
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.

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
Source:
long.scala
type S[+N <: Long] <: Long

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
}
Source:
long.scala
type ToDouble[+X <: Long] <: Double

Double conversion of a Long singleton type.

Double conversion of a Long singleton type.

val x: ToDouble[1L] = 1.0
Source:
long.scala
type ToFloat[+X <: Long] <: Float

Float conversion of a Long singleton type.

Float conversion of a Long singleton type.

val x: ToFloat[1L] = 1.0f
Source:
long.scala
type ToInt[+X <: Long] <: Int

Int conversion of a Long singleton type.

Int conversion of a Long singleton type.

val x: ToInt[1L] = 1
Source:
long.scala
type ^[+X <: Long, +Y <: Long] <: Long

Bitwise xor of X and Y.

Bitwise xor of X and Y.

val xor: 10L ^ 30L = 20L
Source:
long.scala