Class/Object

scala.math

BigInt

Related Docs: object BigInt | package math

Permalink

final class BigInt extends ScalaNumber with ScalaNumericConversions with Serializable

Version

1.0, 15/07/2003

Linear Supertypes
Serializable, ScalaNumericConversions, ScalaNumericAnyConversions, ScalaNumber, Number, java.io.Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BigInt
  2. Serializable
  3. ScalaNumericConversions
  4. ScalaNumericAnyConversions
  5. ScalaNumber
  6. Number
  7. Serializable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BigInt(bigInteger: BigInteger)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def %(that: BigInt): BigInt

    Permalink

    Remainder of BigInts

  4. def &(that: BigInt): BigInt

    Permalink

    Bitwise and of BigInts

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

    Permalink

    Bitwise and-not of BigInts.

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

  6. def *(that: BigInt): BigInt

    Permalink

    Multiplication of BigInts

  7. def +(that: BigInt): BigInt

    Permalink

    Addition of BigInts

  8. def -(that: BigInt): BigInt

    Permalink

    Subtraction of BigInts

  9. def /(that: BigInt): BigInt

    Permalink

    Division of BigInts

  10. def /%(that: BigInt): (BigInt, BigInt)

    Permalink

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

  11. def <(that: BigInt): Boolean

    Permalink

    Less-than of BigInts

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

    Permalink

    Leftshift of BigInt

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

    Permalink

    Less-than-or-equals comparison of BigInts

  14. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. def >(that: BigInt): Boolean

    Permalink

    Greater-than comparison of BigInts

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

    Permalink

    Greater-than-or-equals comparison of BigInts

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

    Permalink

    (Signed) rightshift of BigInt

  18. def ^(that: BigInt): BigInt

    Permalink

    Bitwise exclusive-or of BigInts

  19. def abs: BigInt

    Permalink

    Returns the absolute value of this BigInt

  20. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  21. val bigInteger: BigInteger

    Permalink
  22. def bitCount: Int

    Permalink

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

  23. def bitLength: Int

    Permalink

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

  24. def byteValue(): Byte

    Permalink

    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.

    Definition Classes
    BigIntScalaNumericAnyConversions → Number
  25. def charValue: Char

    Permalink

    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.

  26. def clearBit(n: Int): BigInt

    Permalink

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

  27. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def compare(that: BigInt): Int

    Permalink

    Compares this BigInt with the specified BigInt

  29. def doubleValue(): Double

    Permalink

    Converts this BigInt to a double.

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

    Definition Classes
    BigIntScalaNumericAnyConversions → Number
  30. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. def equals(that: BigInt): Boolean

    Permalink

    Compares this BigInt with the specified BigInt for equality.

  32. def equals(that: Any): Boolean

    Permalink

    Compares this BigInt with the specified value for equality.

    Compares this BigInt with the specified value for equality.

    Definition Classes
    BigInt → AnyRef → Any
  33. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  34. def flipBit(n: Int): BigInt

    Permalink

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

  35. def floatValue(): Float

    Permalink

    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.

    Definition Classes
    BigIntScalaNumericAnyConversions → Number
  36. def gcd(that: BigInt): BigInt

    Permalink

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

  37. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  38. def hashCode(): Int

    Permalink

    Returns the hash code for this BigInt.

    Returns the hash code for this BigInt.

    Definition Classes
    BigInt → AnyRef → Any
  39. def intValue(): Int

    Permalink

    Converts this BigInt to an int.

    Converts this BigInt to an int. If the BigInt is too big to fit in an int, 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.

    Definition Classes
    BigIntScalaNumericAnyConversions → Number
  40. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  41. def isProbablePrime(certainty: Int): Boolean

    Permalink

    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.

  42. def isValidByte: Boolean

    Permalink

    Returns true iff this has a zero fractional part, and is within the range of scala.Byte MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Byte MinValue and MaxValue; otherwise returns false.

    Definition Classes
    BigIntScalaNumericAnyConversions
  43. def isValidChar: Boolean

    Permalink

    Returns true iff this has a zero fractional part, and is within the range of scala.Char MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Char MinValue and MaxValue; otherwise returns false.

    Definition Classes
    BigIntScalaNumericAnyConversions
  44. def isValidDouble: Boolean

    Permalink

    Returns true iff this can be represented exactly by scala.Double; otherwise returns false.

  45. def isValidFloat: Boolean

    Permalink

    Returns true iff this can be represented exactly by scala.Float; otherwise returns false.

  46. def isValidInt: Boolean

    Permalink

    Returns true iff this has a zero fractional part, and is within the range of scala.Int MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Int MinValue and MaxValue; otherwise returns false.

    Definition Classes
    BigIntScalaNumericAnyConversions
  47. def isValidLong: Boolean

    Permalink
  48. def isValidShort: Boolean

    Permalink

    Returns true iff this has a zero fractional part, and is within the range of scala.Short MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Short MinValue and MaxValue; otherwise returns false.

    Definition Classes
    BigIntScalaNumericAnyConversions
  49. def isWhole(): Boolean

    Permalink

    returns

    true if this number has no decimal component, false otherwise.

    Definition Classes
    BigIntScalaNumericAnyConversions → ScalaNumber
  50. def longValue(): Long

    Permalink

    Converts this BigInt to a long.

    Converts this BigInt to a long. If the BigInt is too big to fit in a long, 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.

    Definition Classes
    BigIntScalaNumericAnyConversions → Number
  51. def lowestSetBit: Int

    Permalink

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

  52. def max(that: BigInt): BigInt

    Permalink

    Returns the maximum of this and that

  53. def min(that: BigInt): BigInt

    Permalink

    Returns the minimum of this and that

  54. def mod(that: BigInt): BigInt

    Permalink

    Returns a BigInt whose value is (this mod that).

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

  55. def modInverse(m: BigInt): BigInt

    Permalink

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

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

  56. def modPow(exp: BigInt, m: BigInt): BigInt

    Permalink

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

  57. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  58. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  59. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  60. def pow(exp: Int): BigInt

    Permalink

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

  61. def setBit(n: Int): BigInt

    Permalink

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

  62. def shortValue(): Short

    Permalink

    Converts this BigInt to a short.

    Converts this BigInt to a short. If the BigInt is too big to fit in a short, 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.

    Definition Classes
    BigIntScalaNumericAnyConversions → Number
  63. def signum: Int

    Permalink

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

  64. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  65. def testBit(n: Int): Boolean

    Permalink

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

  66. def to(end: BigInt, step: BigInt = BigInt(1)): Inclusive[scala.BigInt]

    Permalink

    Like until, but inclusive of the end value.

  67. def toByte: Byte

    Permalink

    Returns the value of this as a scala.Byte.

    Returns the value of this as a scala.Byte. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  68. def toByteArray: Array[Byte]

    Permalink

    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.

  69. def toChar: Char

    Permalink

    Returns the value of this as a scala.Char.

    Returns the value of this as a scala.Char. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  70. def toDouble: Double

    Permalink

    Returns the value of this as a scala.Double.

    Returns the value of this as a scala.Double. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  71. def toFloat: Float

    Permalink

    Returns the value of this as a scala.Float.

    Returns the value of this as a scala.Float. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  72. def toInt: Int

    Permalink

    Returns the value of this as an scala.Int.

    Returns the value of this as an scala.Int. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  73. def toLong: Long

    Permalink

    Returns the value of this as a scala.Long.

    Returns the value of this as a scala.Long. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  74. def toShort: Short

    Permalink

    Returns the value of this as a scala.Short.

    Returns the value of this as a scala.Short. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  75. def toString(radix: Int): String

    Permalink

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

  76. def toString(): String

    Permalink

    Returns the decimal String representation of this BigInt.

    Returns the decimal String representation of this BigInt.

    Definition Classes
    BigInt → AnyRef → Any
  77. def unary_-: BigInt

    Permalink

    Returns a BigInt whose value is the negation of this BigInt

  78. def unary_~: BigInt

    Permalink

    Returns the bitwise complement of this BigInt

  79. def underlying(): BigInteger

    Permalink
    Definition Classes
    BigIntScalaNumericConversionsScalaNumericAnyConversions → ScalaNumber
  80. def unifiedPrimitiveEquals(x: Any): Boolean

    Permalink

    Should only be called after all known non-primitive types have been excluded.

    Should only be called after all known non-primitive types have been excluded. This method won't dispatch anywhere else after checking against the primitives to avoid infinite recursion between equals and this on unknown "Number" variants.

    Additionally, this should only be called if the numeric type is happy to be converted to Long, Float, and Double. If for instance a BigInt much larger than the Long range is sent here, it will claim equality with whatever Long is left in its lower 64 bits. Or a BigDecimal with more precision than Double can hold: same thing. There's no way given the interface available here to prevent this error.

    Attributes
    protected
    Definition Classes
    ScalaNumericAnyConversions
  81. def unifiedPrimitiveHashcode(): Int

    Permalink
    Attributes
    protected
    Definition Classes
    ScalaNumericAnyConversions
  82. def until(end: BigInt, step: BigInt = BigInt(1)): Exclusive[scala.BigInt]

    Permalink

    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

  83. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  84. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  85. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  86. def |(that: BigInt): BigInt

    Permalink

    Bitwise or of BigInts

Inherited from Serializable

Inherited from ScalaNumericConversions

Inherited from ScalaNumber

Inherited from Number

Inherited from java.io.Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped