scala.math

BigInt

class BigInt extends ScalaNumber with ScalaNumericConversions

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

  2. def &(that: BigInt): BigInt

    Bitwise and of BigInts

    Bitwise and of BigInts

  3. def &~(that: BigInt): BigInt

    Bitwise and-not of BigInts

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

  4. def *(that: BigInt): BigInt

    Multiplication of BigInts

    Multiplication of BigInts

  5. def +(that: BigInt): BigInt

    Addition of BigInts

    Addition of BigInts

  6. def -(that: BigInt): BigInt

    Subtraction of BigInts

    Subtraction of BigInts

  7. def /(that: BigInt): BigInt

    Division of BigInts

    Division of BigInts

  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).

  9. def <(that: BigInt): Boolean

    Less-than of BigInts

    Less-than of BigInts

  10. def <<(n: Int): BigInt

    Leftshift of BigInt

    Leftshift of BigInt

  11. def <=(that: BigInt): Boolean

    Less-than-or-equals comparison of BigInts

    Less-than-or-equals comparison of BigInts

  12. def >(that: BigInt): Boolean

    Greater-than comparison of BigInts

    Greater-than comparison of BigInts

  13. def >=(that: BigInt): Boolean

    Greater-than-or-equals comparison of BigInts

    Greater-than-or-equals comparison of BigInts

  14. def >>(n: Int): BigInt

    (Signed) rightshift of BigInt

    (Signed) rightshift of BigInt

  15. def ^(that: BigInt): BigInt

    Bitwise exclusive-or of BigInts

    Bitwise exclusive-or of BigInts

  16. def abs: BigInt

    Returns the absolute value of this BigInt

    Returns the absolute value of this BigInt

  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.

  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.

  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.

  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.

  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.

  23. def compare(that: BigInt): Int

    Compares this BigInt with the specified BigInt

    Compares this BigInt with the specified BigInt

  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.

  25. def equals(that: BigInt): Boolean

    Compares this BigInt with the specified BigInt for equality

    Compares this BigInt with the specified BigInt for equality.

  26. def equals(that: Any): Boolean

    Compares this BigInt with the specified value for equality

    Compares this BigInt with the specified value for equality.

  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.

  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.

  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)

  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.

    */

  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.

  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.

  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.

  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).

  39. def max(that: BigInt): BigInt

    Returns the maximum of this and that

    Returns the maximum of this and that

  40. def min(that: BigInt): BigInt

    Returns the minimum of this and that

    Returns the minimum of this and that

  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.

  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).

  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).

  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).

  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.

  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.

  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

  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.

  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.

  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.

  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.

  59. def toString(): String

    Returns the decimal String representation of this BigInt

    Returns the decimal String representation of this BigInt.

  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

  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

  63. def |(that: BigInt): BigInt

    Bitwise or of BigInts

    Bitwise or of BigInts

  64. def ~: BigInt

    Returns the bitwise complement of this BigNum

    Returns the bitwise complement of this BigNum

Instance constructors

  1. new BigInt(bigInteger: BigInteger)

  2. new BigInt()