BigInt

object BigInt
Companion
class
Source
BigInt.scala
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(i: Int): BigInt

Constructs a BigInt whose value is equal to that of the specified integer value.

Value Params
i

the specified integer value

Returns

the constructed BigInt

Source
BigInt.scala
def apply(l: Long): BigInt

Constructs a BigInt whose value is equal to that of the specified long value.

Value Params
l

the specified long value

Returns

the constructed BigInt

Source
BigInt.scala
def apply(x: Array[Byte]): BigInt

Translates a byte array containing the two's-complement binary representation of a BigInt into a BigInt.

def apply(signum: Int, magnitude: Array[Byte]): BigInt

Translates the sign-magnitude representation of a BigInt into a BigInt.

Value Params
magnitude

big-endian binary representation of the magnitude of the number.

signum

signum of the number (-1 for negative, 0 for zero, 1 for positive).

Source
BigInt.scala
def apply(bitlength: Int, certainty: Int, rnd: Random): BigInt

Constructs a randomly generated positive BigInt that is probably prime, with the specified bitLength.

def apply(numbits: Int, rnd: Random): BigInt

Constructs a randomly generated BigInt, uniformly distributed over the range 0 to (2 ^ numBits - 1), inclusive.

def apply(x: String): BigInt

Translates the decimal String representation of a BigInt into a BigInt.

def apply(x: String, radix: Int): BigInt

Translates the string representation of a BigInt in the specified radix into a BigInt.

Translates a java.math.BigInteger into a BigInt.

def probablePrime(bitLength: Int, rnd: Random): BigInt

Returns a positive BigInt that is probably prime, with the specified bitLength.

Implicits

Implicits

implicit def int2bigInt(i: Int): BigInt

Implicit conversion from Int to BigInt.

Implicit conversion from java.math.BigInteger to scala.BigInt.

implicit def long2bigInt(l: Long): BigInt

Implicit conversion from Long to BigInt.