scala.math

BigInt

class BigInt extends ScalaNumber with ScalaNumericConversions

Go to: companion

Inherits

  1. ScalaNumericConversions
  2. ScalaNumber
  3. Number
  4. Serializable
  5. AnyRef
  6. Any

Value Members

  1. def %(that: BigInt): BigInt

    Remainder of BigInts

    Remainder of BigInts

    Go to: companion
  2. def &(that: BigInt): BigInt

    Bitwise and of BigInts

    Bitwise and of BigInts

    Go to: companion
  3. def &~(that: BigInt): BigInt

    Bitwise and-not of BigInts

    Bitwise and-not of BigInts. Returns a BigInt whose value is (this & ~that).

    Go to: companion
  4. def *(that: BigInt): BigInt

    Multiplication of BigInts

    Multiplication of BigInts

    Go to: companion
  5. def +(that: BigInt): BigInt

    Addition of BigInts

    Addition of BigInts

    Go to: companion
  6. def -(that: BigInt): BigInt

    Subtraction of BigInts

    Subtraction of BigInts

    Go to: companion
  7. def /(that: BigInt): BigInt

    Division of BigInts

    Division of BigInts

    Go to: companion
  8. def /%(that: BigInt): (BigInt, BigInt)

    Returns a pair of two BigInts containing (this / that) and (this % that)

    Returns a pair of two BigInts containing (this / that) and (this % that).

    Go to: companion
  9. def <(that: BigInt): Boolean

    Less-than of BigInts

    Less-than of BigInts

    Go to: companion
  10. def <<(n: Int): BigInt

    Leftshift of BigInt

    Leftshift of BigInt

    Go to: companion
  11. def <=(that: BigInt): Boolean

    Less-than-or-equals comparison of BigInts

    Less-than-or-equals comparison of BigInts

    Go to: companion
  12. def >(that: BigInt): Boolean

    Greater-than comparison of BigInts

    Greater-than comparison of BigInts

    Go to: companion
  13. def >=(that: BigInt): Boolean

    Greater-than-or-equals comparison of BigInts

    Greater-than-or-equals comparison of BigInts

    Go to: companion
  14. def >>(n: Int): BigInt

    (Signed) rightshift of BigInt

    (Signed) rightshift of BigInt

    Go to: companion
  15. def ^(that: BigInt): BigInt

    Bitwise exclusive-or of BigInts

    Bitwise exclusive-or of BigInts

    Go to: companion
  16. def abs: BigInt

    Returns the absolute value of this BigInt

    Returns the absolute value of this BigInt

    Go to: companion
  17. val bigInteger: BigInteger

  18. def bitCount: Int

    Returns the number of bits in the two's complement representation of this BigInt that differ from its sign bit

    Returns the number of bits in the two's complement representation of this BigInt that differ from its sign bit.

    Go to: companion
  19. def bitLength: Int

    Returns the number of bits in the minimal two's-complement representation of this BigInt, excluding a sign bit

    Returns the number of bits in the minimal two's-complement representation of this BigInt, excluding a sign bit.

    Go to: companion
  20. def byteValue(): Byte

    Converts this BigInt to a byte

    Converts this BigInt to a byte. If the BigInt is too big to fit in a byte, only the low-order 8 bits are returned. Note that this conversion can lose information about the overall magnitude of the BigInt value as well as return a result with the opposite sign.

    Go to: companion
  21. def charValue: Char

    Converts this BigInt to a char

    Converts this BigInt to a char. If the BigInt is too big to fit in a char, only the low-order 16 bits are returned. Note that this conversion can lose information about the overall magnitude of the BigInt value and that it always returns a positive result.

    Go to: companion
  22. def clearBit(n: Int): BigInt

    Returns a BigInt whose value is equivalent to this BigInt with the designated bit cleared

    Returns a BigInt whose value is equivalent to this BigInt with the designated bit cleared.

    Go to: companion
  23. def compare(that: BigInt): Int

    Compares this BigInt with the specified BigInt

    Compares this BigInt with the specified BigInt

    Go to: companion
  24. def doubleValue(): Double

    Converts this BigInt to a double

    Converts this BigInt to a double. if this BigInt has too great a magnitude to represent as a float, it will be converted to Float.NEGATIVE_INFINITY or Float.POSITIVE_INFINITY as appropriate.

    Go to: companion
  25. def equals(that: BigInt): Boolean

    Compares this BigInt with the specified BigInt for equality

    Compares this BigInt with the specified BigInt for equality.

    Go to: companion
  26. def equals(that: Any): Boolean

    Compares this BigInt with the specified value for equality

    Compares this BigInt with the specified value for equality.

    Go to: companion
  27. def flipBit(n: Int): BigInt

    Returns a BigInt whose value is equivalent to this BigInt with the designated bit flipped

    Returns a BigInt whose value is equivalent to this BigInt with the designated bit flipped.

    Go to: companion
  28. def floatValue(): Float

    Converts this BigInt to a float

    Converts this BigInt to a float. if this BigInt has too great a magnitude to represent as a float, it will be converted to Float.NEGATIVE_INFINITY or Float.POSITIVE_INFINITY as appropriate.

    Go to: companion
  29. def gcd(that: BigInt): BigInt

    Returns the greatest common divisor of abs(this) and abs(that)

    Returns the greatest common divisor of abs(this) and abs(that)

    Go to: companion
  30. def hashCode(): Int

    Returns the hash code for this BigInt

    Returns the hash code for this BigInt. @return the hash code value for the object.

    */

    Go to: companion
  31. def intValue(): Int

    Converts this BigInt to an int

    Converts this BigInt to an int. If the BigInt is too big to fit in a char, only the low-order 32 bits are returned. Note that this conversion can lose information about the overall magnitude of the BigInt value as well as return a result with the opposite sign.

    Go to: companion
  32. def isProbablePrime(certainty: Int): Boolean

    Returns true if this BigInt is probably prime, false if it's definitely composite

    Returns true if this BigInt is probably prime, false if it's definitely composite.

    certainty

    a measure of the uncertainty that the caller is willing to tolerate: if the call returns true the probability that this BigInt is prime exceeds (1 - 1/2 certainty). The execution time of this method is proportional to the value of this parameter.

    Go to: companion
  33. def isValidByte: Boolean

  34. def isValidChar: Boolean

  35. def isValidInt: Boolean

  36. def isValidShort: Boolean

  37. def longValue(): Long

    Converts this BigInt to a long

    Converts this BigInt to a long. If the BigInt is too big to fit in a char, only the low-order 64 bits are returned. Note that this conversion can lose information about the overall magnitude of the BigInt value as well as return a result with the opposite sign.

    Go to: companion
  38. def lowestSetBit: Int

    Returns the index of the rightmost (lowest-order) one bit in this BigInt (the number of zero bits to the right of the rightmost one bit)

    Returns the index of the rightmost (lowest-order) one bit in this BigInt (the number of zero bits to the right of the rightmost one bit).

    Go to: companion
  39. def max(that: BigInt): BigInt

    Returns the maximum of this and that

    Returns the maximum of this and that

    Go to: companion
  40. def min(that: BigInt): BigInt

    Returns the minimum of this and that

    Returns the minimum of this and that

    Go to: companion
  41. def mod(that: BigInt): BigInt

    Returns a BigInt whose value is (this mod m)

    Returns a BigInt whose value is (this mod m). This method differs from %' in that it always returns a non-negative BigInt.

    Go to: companion
  42. def modInverse(m: BigInt): BigInt

    Returns a BigInt whose value is (the inverse of this modulo m)

    Returns a BigInt whose value is (the inverse of this modulo m).

    Go to: companion
  43. def modPow(exp: BigInt, m: BigInt): BigInt

    Returns a BigInt whose value is (this raised to the power of exp modulo m)

    Returns a BigInt whose value is (this raised to the power of exp modulo m).

    Go to: companion
  44. def pow(exp: Int): BigInt

    Returns a BigInt whose value is (this raised to the power of exp)

    Returns a BigInt whose value is (this raised to the power of exp).

    Go to: companion
  45. def setBit(n: Int): BigInt

    Returns a BigInt whose value is equivalent to this BigInt with the designated bit set

    Returns a BigInt whose value is equivalent to this BigInt with the designated bit set.

    Go to: companion
  46. def shortValue(): Short

    Converts this BigInt to a short

    Converts this BigInt to a short. If the BigInt is too big to fit in a byte, only the low-order 16 bits are returned. Note that this conversion can lose information about the overall magnitude of the BigInt value as well as return a result with the opposite sign.

    Go to: companion
  47. def signum: Int

    Returns the sign of this BigInt, i

    Returns the sign of this BigInt, i.e. -1 if it is less than 0, +1 if it is greater than 0 0 if it is equal to 0

    Go to: companion
  48. def testBit(n: Int): Boolean

    Returns true if and only if the designated bit is set

    Returns true if and only if the designated bit is set.

    Go to: companion
  49. def to(end: BigInt, step: BigInt): Inclusive[BigInt]

    Like until, but inclusive of the end value

    Like until, but inclusive of the end value.

    Go to: companion
  50. def toByte: Byte

  51. def toByteArray: Array[Byte]

    Returns a byte array containing the two's-complement representation of this BigInt

    Returns a byte array containing the two's-complement representation of this BigInt. The byte array will be in big-endian byte-order: the most significant byte is in the zeroth element. The array will contain the minimum number of bytes required to represent this BigInt, including at least one sign bit.

    Go to: companion
  52. def toChar: Char

  53. def toDouble: Double

  54. def toFloat: Float

  55. def toInt: Int

  56. def toLong: Long

  57. def toShort: Short

  58. def toString(radix: Int): String

    Returns the String representation in the specified radix of this BigInt

    Returns the String representation in the specified radix of this BigInt.

    Go to: companion
  59. def toString(): String

    Returns the decimal String representation of this BigInt

    Returns the decimal String representation of this BigInt.

    Go to: companion
  60. def unary_-: BigInt

    Returns a BigInt whose value is the negation of this BigInt

    Returns a BigInt whose value is the negation of this BigInt

    Go to: companion
  61. def underlying(): BigInteger

  62. def until(end: BigInt, step: BigInt): Exclusive[BigInt]

    Create a NumericRange[BigInt] in range [start;end) with the specified step, where start is the target BigInt

    Create a NumericRange[BigInt] in range [start;end) with the specified step, where start is the target BigInt.

    end

    the end value of the range (exclusive)

    step

    the distance between elements (defaults to 1)

    returns

    the range

    Go to: companion
  63. def |(that: BigInt): BigInt

    Bitwise or of BigInts

    Bitwise or of BigInts

    Go to: companion
  64. def ~: BigInt

    Returns the bitwise complement of this BigNum

    Returns the bitwise complement of this BigNum

    Go to: companion

Instance constructors

  1. new BigInt(bigInteger: BigInteger)

  2. new BigInt()