scala.BigInt

class BigInt

class BigInt(val bigInteger : BigInteger)

 extends Number with ScalaObject


author
- Martin Odersky
version
- 1.0, 15/07/2003


Companion: BigInt

Source: BigInt.scala(117)

 Constructors

def this(bigInteger : BigInteger)

 Fields

abs def abs
Returns the absolute value of this BigInt
BigInt
bitCount def bitCount
Returns the number of bits in the two's complement representation of this BigInt that differ from its sign bit
Int
bitLength def bitLength
Returns the number of bits in the minimal two's-complement representation of this BigInt, excluding a sign bit
Int
charValue def charValue
Converts this BigInt to a char [details]
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.
Char
lowestSetBit def lowestSetBit
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)
Int
signum def signum
Returns the sign of this BigInt, i [details]
e. -1 if it is less than 0, +1 if it is greater than 0 0 if it is equal to 0
Int
toByteArray def toByteArray
Returns a byte array containing the two's-complement representation of this BigInt [details]
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.
Array[Byte]
unary_- def unary_-
Returns a BigInt whose value is the negation of this BigInt
BigInt
~ def ~
Returns the bitwise complement of this BigNum
BigInt

 Methods

!= final def !=(arg0 : Object) Boolean AnyRef
!= final def !=(arg0 : Any) Boolean Any
% def %(that : BigInt)
Remainder of BigInts
BigInt
& def &(that : BigInt)
Bitwise and of BigInts
BigInt
&~ def &~(that : BigInt)
Bitwise and-not of BigInts [details]
Returns a BigInt whose value is (this & ~that).
BigInt
* def *(that : BigInt)
Multiplication of BigInts
BigInt
+ def +(that : BigInt)
Addition of BigInts
BigInt
- def -(that : BigInt)
Subtraction of BigInts
BigInt
/ def /(that : BigInt)
Division of BigInts
BigInt
/% def /%(that : BigInt)
Returns a pair of two BigInts containing (this / that) and (this % that)
(BigInt, BigInt)
< def <(that : BigInt)
Less-than of BigInts
Boolean
<< def <<(n : Int)
Leftshift of BigInt
BigInt
<= def <=(that : BigInt)
Less-than-or-equals comparison of BigInts
Boolean
== final def ==(arg0 : Any) Boolean Any
== final def ==(arg0 : Object) Boolean AnyRef
> def >(that : BigInt)
Greater-than comparison of BigInts
Boolean
>= def >=(that : BigInt)
Greater-than-or-equals comparison of BigInts
Boolean
>> def >>(n : Int)
(Signed) rightshift of BigInt
BigInt
^ def ^(that : BigInt)
Bitwise exclusive-or of BigInts
BigInt
asInstanceOf final def asInstanceOf[T0] T0 Any
byteValue override def byteValue
Converts this BigInt to a byte [details]
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.
Byte
clearBit def clearBit(n : Int)
Returns a BigInt whose value is equivalent to this BigInt with the designated bit cleared
BigInt
clone protected def clone Object AnyRef
compare def compare(that : BigInt)
Compares this BigInt with the specified BigInt
Int
doubleValue def doubleValue
Converts this BigInt to a double [details]
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.
Double
eq final def eq(arg0 : Object) Boolean AnyRef
equals override def equals(that : Any)
Compares this BigInt with the specified value for equality
Boolean
equals def equals(that : BigInt)
Compares this BigInt with the specified BigInt for equality
Boolean
finalize protected def finalize Unit AnyRef
flipBit def flipBit(n : Int)
Returns a BigInt whose value is equivalent to this BigInt with the designated bit flipped
BigInt
floatValue def floatValue
Converts this BigInt to a float [details]
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.
Float
gcd def gcd(that : BigInt)
Returns the greatest common divisor of abs(this) and abs(that)
BigInt
getClass final def getClass Class[Any] AnyRef
hashCode override def hashCode
Returns the hash code for this BigInt
Int
intValue def intValue
Converts this BigInt to an int [details]
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.
Int
isInstanceOf final def isInstanceOf[T0] Boolean Any
isProbablePrime def isProbablePrime(certainty : Int)
Returns true if this BigInt is probably prime, false if it's definitely composite [details]
param
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.
Boolean
longValue def longValue
Converts this BigInt to a long [details]
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.
Long
max def max(that : BigInt)
Returns the maximum of this and that
BigInt
min def min(that : BigInt)
Returns the minimum of this and that
BigInt
mod def mod(that : BigInt)
Returns a BigInt whose value is (this mod m) [details]
This method differs from `%' in that it always returns a non-negative BigInt.
BigInt
modInverse def modInverse(m : BigInt)
Returns a BigInt whose value is (the inverse of this modulo m)
BigInt
modPow def modPow(exp : BigInt, m : BigInt)
Returns a BigInt whose value is (this raised to the power of exp modulo m)
BigInt
ne final def ne(arg0 : Object) Boolean AnyRef
notify final def notify Unit AnyRef
notifyAll final def notifyAll Unit AnyRef
pow def pow(exp : Int)
Returns a BigInt whose value is (this raised to the power of exp)
BigInt
setBit def setBit(n : Int)
Returns a BigInt whose value is equivalent to this BigInt with the designated bit set
BigInt
shortValue override def shortValue
Converts this BigInt to a short [details]
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.
Short
synchronized final def synchronized[T0](arg0 : T0) T0 AnyRef
testBit def testBit(n : Int)
Returns true if and only if the designated bit is set
Boolean
toString def toString(radix : Int)
Returns the String representation in the specified radix of this BigInt
String
toString override def toString
Returns the decimal String representation of this BigInt
String
wait final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
wait final def wait Unit AnyRef
wait final def wait(arg0 : Long) Unit AnyRef
| def |(that : BigInt)
Bitwise or of BigInts
BigInt
Copyright (c) 2008. All Rights Reserved.