JML

java.math
Class BigInteger

java.lang.Object
  extended byjava.lang.Number
      extended byjava.math.BigInteger
All Implemented Interfaces:
Comparable, Serializable

public class BigInteger
extends Number
implements Comparable


Field Summary
private  int bitCount
           
private  int bitLength
           
private static long[] bitsPerDigit
           
(package private) static int[] bnExpModThreshTable
           
private static int[] digitsPerInt
           
private static int[] digitsPerLong
           
private  int firstNonzeroByteNum
           
private  int firstNonzeroIntNum
           
private static int[] intRadix
           
private static long LONG_MASK
           
private static BigInteger[] longRadix
           
private  int lowestSetBit
           
(package private)  int[] mag
           
private static int MAX_CONSTANT
           
private static BigInteger[] negConst
           
static BigInteger ONE
           
private static BigInteger[] posConst
           
private static ObjectStreamField[] serialPersistentFields
           
private static long serialVersionUID
           
(package private)  int signum
           
private static BigInteger SMALL_PRIME_PRODUCT
           
private static int SMALL_PRIME_THRESHOLD
           
(package private) static byte[] trailingZeroTable
           
private static BigInteger TWO
           
static BigInteger ZERO
           
private static String[] zeros
           
 
Constructor Summary
  BigInteger(byte[])
           
private BigInteger(byte[], int)
           
(package private) BigInteger(char[])
           
  BigInteger(int, byte[])
           
  BigInteger(int, int, Random)
           
private BigInteger(int, int[])
           
  BigInteger(int, Random)
           
private BigInteger(int[])
           
private BigInteger(int[], int)
           
  BigInteger(String)
           
  BigInteger(String, int)
           
(package private) BigInteger(MutableBigInteger, int)
           
private BigInteger(long)
           
 
Method Summary
 BigInteger abs()
           
private static int[] add(int[], int[])
           
 BigInteger add(BigInteger)
           
(package private) static int addOne(int[], int, int, int)
           
 BigInteger and(BigInteger)
           
 BigInteger andNot(BigInteger)
           
(package private) static int bitCnt(int)
           
 int bitCount()
           
(package private) static int bitLen(int)
           
 int bitLength()
           
private static int bitLength(int[], int)
           
 BigInteger clearBit(int)
           
 int compareTo(Object)
           
 int compareTo(BigInteger)
           
private static void destructiveMulAdd(int[], int, int)
           
 BigInteger divide(BigInteger)
           
 BigInteger[] divideAndRemainder(BigInteger)
           
 double doubleValue()
           
 boolean equals(Object)
           
private  int firstNonzeroIntNum()
           
 BigInteger flipBit(int)
           
 float floatValue()
           
 BigInteger gcd(BigInteger)
           
private  int getInt(int)
           
 int getLowestSetBit()
           
 int hashCode()
           
private static int intArrayCmp(int[], int[])
           
private static int intArrayCmpToLen(int[], int[], int)
           
private  int intLength()
           
 int intValue()
           
 boolean isProbablePrime(int)
           
(package private)  int jacobiSymbol(int, BigInteger)
           
(package private)  int[] javaIncrement(int[])
           
private static BigInteger largePrime(int, int, Random)
           
private static int[] leftShift(int[], int, int)
           
 long longValue()
           
private static BigInteger lucasLehmerSequence(int, BigInteger, BigInteger)
           
private  byte[] magSerializedForm()
           
private static int[] makePositive(byte[])
           
private static int[] makePositive(int[])
           
 BigInteger max(BigInteger)
           
 BigInteger min(BigInteger)
           
 BigInteger mod(BigInteger)
           
private  BigInteger mod2(int)
           
 BigInteger modInverse(BigInteger)
           
 BigInteger modPow(BigInteger, BigInteger)
           
private  BigInteger modPow2(BigInteger, int)
           
private static int[] montReduce(int[], int[], int, int)
           
(package private) static int mulAdd(int[], int[], int, int, int)
           
 BigInteger multiply(BigInteger)
           
private  int[] multiplyToLen(int[], int, int[], int, int[])
           
 BigInteger negate()
           
 BigInteger not()
           
private  BigInteger oddModPow(BigInteger, BigInteger)
           
 BigInteger or(BigInteger)
           
private  int parseInt(char[], int, int)
           
private  boolean passesLucasLehmer()
           
private  boolean passesMillerRabin(int)
           
 BigInteger pow(int)
           
(package private)  boolean primeToCertainty(int)
           
(package private) static void primitiveLeftShift(int[], int, int)
           
(package private) static void primitiveRightShift(int[], int, int)
           
static BigInteger probablePrime(int, Random)
           
private static byte[] randomBits(int, Random)
           
private  void readObject(ObjectInputStream)
           
 BigInteger remainder(BigInteger)
           
 BigInteger setBit(int)
           
 BigInteger shiftLeft(int)
           
 BigInteger shiftRight(int)
           
private  int signBit()
           
private  int signInt()
           
 int signum()
           
private static BigInteger smallPrime(int, int, Random)
           
private  BigInteger square()
           
private static int[] squareToLen(int[], int, int[])
           
private static int[] stripLeadingZeroBytes(byte[])
           
private static int[] stripLeadingZeroInts(int[])
           
private static int subN(int[], int[], int)
           
private static int[] subtract(int[], int[])
           
 BigInteger subtract(BigInteger)
           
 boolean testBit(int)
           
 byte[] toByteArray()
           
 String toString()
           
 String toString(int)
           
(package private) static int trailingZeroCnt(int)
           
private static int[] trustedStripLeadingZeroInts(int[])
           
private static BigInteger valueOf(int[])
           
static BigInteger valueOf(long)
           
private  void writeObject(ObjectOutputStream)
           
 BigInteger xor(BigInteger)
           
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

zeros

private static String[] zeros

intRadix

private static int[] intRadix

posConst

private static BigInteger[] posConst

bitLength

private int bitLength

bnExpModThreshTable

static int[] bnExpModThreshTable

SMALL_PRIME_THRESHOLD

private static final int SMALL_PRIME_THRESHOLD

ZERO

public static final BigInteger ZERO

trailingZeroTable

static final byte[] trailingZeroTable

bitCount

private int bitCount

lowestSetBit

private int lowestSetBit

serialPersistentFields

private static final ObjectStreamField[] serialPersistentFields

digitsPerInt

private static int[] digitsPerInt

MAX_CONSTANT

private static final int MAX_CONSTANT

bitsPerDigit

private static long[] bitsPerDigit

signum

int signum

serialVersionUID

private static final long serialVersionUID

digitsPerLong

private static int[] digitsPerLong

negConst

private static BigInteger[] negConst

LONG_MASK

private static final long LONG_MASK

ONE

public static final BigInteger ONE

longRadix

private static BigInteger[] longRadix

TWO

private static final BigInteger TWO

firstNonzeroIntNum

private int firstNonzeroIntNum

SMALL_PRIME_PRODUCT

private static final BigInteger SMALL_PRIME_PRODUCT

mag

int[] mag

firstNonzeroByteNum

private int firstNonzeroByteNum
Constructor Detail

BigInteger

public BigInteger(int,
                  byte[])

BigInteger

private BigInteger(int,
                   int[])

BigInteger

private BigInteger(long)

BigInteger

public BigInteger(byte[])

BigInteger

private BigInteger(byte[],
                   int)

BigInteger

BigInteger(char[])

BigInteger

private BigInteger(int[])

BigInteger

private BigInteger(int[],
                   int)

BigInteger

public BigInteger(String)

BigInteger

public BigInteger(String,
                  int)

BigInteger

BigInteger(MutableBigInteger,
           int)

BigInteger

public BigInteger(int,
                  int,
                  Random)

BigInteger

public BigInteger(int,
                  Random)
Method Detail

doubleValue

public double doubleValue()

floatValue

public float floatValue()

bitCount

public int bitCount()

bitLength

public int bitLength()

firstNonzeroIntNum

private int firstNonzeroIntNum()

getLowestSetBit

public int getLowestSetBit()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

intLength

private int intLength()

intValue

public int intValue()

signBit

private int signBit()

signInt

private int signInt()

signum

public int signum()

longValue

public long longValue()

passesLucasLehmer

private boolean passesLucasLehmer()

magSerializedForm

private byte[] magSerializedForm()

toByteArray

public byte[] toByteArray()

bitCnt

static int bitCnt(int)

bitLen

static int bitLen(int)

getInt

private int getInt(int)

trailingZeroCnt

static int trailingZeroCnt(int)

isProbablePrime

public boolean isProbablePrime(int)

passesMillerRabin

private boolean passesMillerRabin(int)

primeToCertainty

boolean primeToCertainty(int)

testBit

public boolean testBit(int)

makePositive

private static int[] makePositive(byte[])

stripLeadingZeroBytes

private static int[] stripLeadingZeroBytes(byte[])

parseInt

private int parseInt(char[],
                     int,
                     int)

javaIncrement

int[] javaIncrement(int[])

makePositive

private static int[] makePositive(int[])

stripLeadingZeroInts

private static int[] stripLeadingZeroInts(int[])

trustedStripLeadingZeroInts

private static int[] trustedStripLeadingZeroInts(int[])

bitLength

private static int bitLength(int[],
                             int)

destructiveMulAdd

private static void destructiveMulAdd(int[],
                                      int,
                                      int)

primitiveLeftShift

static void primitiveLeftShift(int[],
                               int,
                               int)

primitiveRightShift

static void primitiveRightShift(int[],
                                int,
                                int)

leftShift

private static int[] leftShift(int[],
                               int,
                               int)

addOne

static int addOne(int[],
                  int,
                  int,
                  int)

squareToLen

private static final int[] squareToLen(int[],
                                       int,
                                       int[])

multiplyToLen

private int[] multiplyToLen(int[],
                            int,
                            int[],
                            int,
                            int[])

intArrayCmp

private static int intArrayCmp(int[],
                               int[])

add

private static int[] add(int[],
                         int[])

subtract

private static int[] subtract(int[],
                              int[])

intArrayCmpToLen

private static int intArrayCmpToLen(int[],
                                    int[],
                                    int)

subN

private static int subN(int[],
                        int[],
                        int)

montReduce

private static int[] montReduce(int[],
                                int[],
                                int,
                                int)

mulAdd

static int mulAdd(int[],
                  int[],
                  int,
                  int,
                  int)

readObject

private void readObject(ObjectInputStream)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException

writeObject

private void writeObject(ObjectOutputStream)
                  throws IOException
Throws:
IOException

compareTo

public int compareTo(Object)
Specified by:
compareTo in interface Comparable

equals

public boolean equals(Object)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

toString

public String toString(int)

abs

public BigInteger abs()

negate

public BigInteger negate()

not

public BigInteger not()

square

private BigInteger square()

clearBit

public BigInteger clearBit(int)

flipBit

public BigInteger flipBit(int)

mod2

private BigInteger mod2(int)

pow

public BigInteger pow(int)

setBit

public BigInteger setBit(int)

shiftLeft

public BigInteger shiftLeft(int)

shiftRight

public BigInteger shiftRight(int)

jacobiSymbol

int jacobiSymbol(int,
                 BigInteger)

valueOf

public static BigInteger valueOf(long)

compareTo

public int compareTo(BigInteger)

valueOf

private static BigInteger valueOf(int[])

randomBits

private static byte[] randomBits(int,
                                 Random)

add

public BigInteger add(BigInteger)

and

public BigInteger and(BigInteger)

andNot

public BigInteger andNot(BigInteger)

divide

public BigInteger divide(BigInteger)

gcd

public BigInteger gcd(BigInteger)

max

public BigInteger max(BigInteger)

min

public BigInteger min(BigInteger)

mod

public BigInteger mod(BigInteger)

modInverse

public BigInteger modInverse(BigInteger)

multiply

public BigInteger multiply(BigInteger)

or

public BigInteger or(BigInteger)

remainder

public BigInteger remainder(BigInteger)

subtract

public BigInteger subtract(BigInteger)

xor

public BigInteger xor(BigInteger)

divideAndRemainder

public BigInteger[] divideAndRemainder(BigInteger)

modPow2

private BigInteger modPow2(BigInteger,
                           int)

largePrime

private static BigInteger largePrime(int,
                                     int,
                                     Random)

smallPrime

private static BigInteger smallPrime(int,
                                     int,
                                     Random)

probablePrime

public static BigInteger probablePrime(int,
                                       Random)

lucasLehmerSequence

private static BigInteger lucasLehmerSequence(int,
                                              BigInteger,
                                              BigInteger)

modPow

public BigInteger modPow(BigInteger,
                         BigInteger)

oddModPow

private BigInteger oddModPow(BigInteger,
                             BigInteger)

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.