Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.compiletime/scala.compiletime.ops/long

long

scala.compiletime.ops.long
objectlong

Attributes

Source
long.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Self type
long.type

Members list

Type members

Types

infixtype%[X <:Long,Y <:Long] <:Long

Remainder of the division ofX byY.

Remainder of the division ofX byY.

import compiletime.ops.long.*val mod: 5L % 2L = 1L

Attributes

Source
long.scala
infixtype*[X <:Long,Y <:Long] <:Long

Multiplication of twoLong singleton types.

Multiplication of twoLong singleton types.

import compiletime.ops.long.*val mul: 4L * 2L = 8L

Attributes

Source
long.scala
infixtype+[X <:Long,Y <:Long] <:Long

Addition of twoLong singleton types.

Addition of twoLong singleton types.

import compiletime.ops.long.*val sum: 2L + 2L = 4L

Attributes

Source
long.scala
infixtype-[X <:Long,Y <:Long] <:Long

Subtraction of twoLong singleton types.

Subtraction of twoLong singleton types.

import compiletime.ops.long.*val sub: 4L - 2L = 2L

Attributes

Source
long.scala
infixtype/[X <:Long,Y <:Long] <:Long

Integer division of twoLong singleton types.

Integer division of twoLong singleton types.

import compiletime.ops.long.*val div: 5L / 2L = 2L

Attributes

Source
long.scala
infixtype<[X <:Long,Y <:Long] <:Boolean

Less-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 = true

Attributes

Source
long.scala
infixtype<<[X <:Long,Y <:Long] <:Long

Binary left shift ofX byY.

Binary left shift ofX byY.

import compiletime.ops.long.*val lshift: 1L << 2L = 4L

Attributes

Source
long.scala
infixtype<=[X <:Long,Y <:Long] <:Boolean

Less-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 = true

Attributes

Source
long.scala
infixtype>[X <:Long,Y <:Long] <:Boolean

Greater-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 = false

Attributes

Source
long.scala
infixtype>=[X <:Long,Y <:Long] <:Boolean

Greater-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 = false

Attributes

Source
long.scala
infixtype>>[X <:Long,Y <:Long] <:Long

Binary right shift ofX byY.

Binary right shift ofX byY.

import compiletime.ops.long.*val rshift: 10L >> 1L = 5L

Attributes

Source
long.scala
infixtype>>>[X <:Long,Y <:Long] <:Long

Binary 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 = 5L

Attributes

Source
long.scala
typeAbs[X <:Long] <:Long

Absolute value of anLong singleton type.

Absolute value of anLong singleton type.

import compiletime.ops.long.*val abs: Abs[-1L] = 1L

Attributes

Source
long.scala
typeBitwiseAnd[X <:Long,Y <:Long] <:Long

Bitwise and ofX andY.

Bitwise and ofX andY.

import compiletime.ops.long.*val and1: BitwiseAnd[4L, 4L] = 4Lval and2: BitwiseAnd[10L, 5L] = 0L

Attributes

Source
long.scala
typeBitwiseOr[X <:Long,Y <:Long] <:Long

Bitwise or ofX andY.

Bitwise or ofX andY.

import compiletime.ops.long.*val or: BitwiseOr[10L, 11L] = 11L

Attributes

Source
long.scala
typeMax[X <:Long,Y <:Long] <:Long

Maximum of twoLong singleton types.

Maximum of twoLong singleton types.

import compiletime.ops.long.*val max: Max[-1L, 1L] = 1L

Attributes

Source
long.scala
typeMin[X <:Long,Y <:Long] <:Long

Minimum of twoLong singleton types.

Minimum of twoLong singleton types.

import compiletime.ops.long.*val min: Min[-1L, 1L] = -1L

Attributes

Source
long.scala
typeNegate[X <:Long] <:Long

Negation of anLong singleton type.

Negation of anLong singleton type.

import compiletime.ops.long.*val neg1: Negate[-1L] = 1Lval 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 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] = 3

Attributes

Source
long.scala
typeToDouble[X <:Long] <:Double

Double conversion of aLong singleton type.

Double conversion of aLong singleton type.

import compiletime.ops.long.*val x: ToDouble[1L] = 1.0

Attributes

Source
long.scala
typeToFloat[X <:Long] <:Float

Float conversion of aLong singleton type.

Float conversion of aLong singleton type.

import compiletime.ops.long.*val x: ToFloat[1L] = 1.0f

Attributes

Source
long.scala
typeToInt[X <:Long] <:Int

Int conversion of aLong singleton type.

Int conversion of aLong singleton type.

import compiletime.ops.long.*val x: ToInt[1L] = 1

Attributes

Source
long.scala
infixtype^[X <:Long,Y <:Long] <:Long

Bitwise xor ofX andY.

Bitwise xor ofX andY.

import compiletime.ops.long.*val xor: 10L ^ 30L = 20L

Attributes

Source
long.scala

Deprecated types

typeS[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}

Attributes

Deprecated
[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.
Source
long.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp