Uses of Class
it.unich.jgmp.MPZ

Packages that use MPZ
Package
Description
This package contains all the high-level classes of JGMP.
  • Uses of MPZ in it.unich.jgmp

    Methods in it.unich.jgmp that return MPZ
    Modifier and Type
    Method
    Description
    MPZ.abs()
    Return an MPZ whose value is the absolute value of this.
    MPZ.absAssign()
    Set this MPZ to its absolute value.
    MPZ.absAssign(MPZ op)
    Set this MPZ to the absolute value of op.
    MPZ.add(MPZ op)
    Return an MPZ whose value is (this + op).
    MPZ.addAssign(MPZ op)
    Set this MPZ to (this + op)
    MPZ.addAssign(MPZ op1, MPZ op2)
    Set this MPZ to (op1 + op2).
    MPZ.addmul(MPZ op1, MPZ op2)
    Return an MPZ whose value is (this + op1 * op2).
    MPZ.addmulAssign(MPZ op1, MPZ op2)
    Add (op1 * op2) to this MPZ.
    MPZ.addmulUi(MPZ op1, long op2)
    Return an MPZ whose value is (this + op1 * op2).
    MPZ.addmulUiAssign(MPZ op1, long op2)
    Add (op1 * op2) to this MPZ.
    MPZ.addUi(long op)
    Return an MPZ whose value is (this + op).
    MPZ.addUiAssign(long op)
    Set this MPZ to (this + op)
    MPZ.addUiAssign(MPZ op1, long op2)
    Set this MPZ to (op1 + op2).
    MPZ.and(MPZ op)
    Return an MPZ whose value is (this & op).
    MPZ.andAssign(MPZ op)
    Set this MPZ to (this & op).
    MPZ.andAssign(MPZ op1, MPZ op2)
    Set this MPZ to (op1 & op2).
    MPZ.binUi(long k)
    Return an MPZ whose value is the binomial coefficient this over k.
    MPZ.binUiAssign(long k)
    Set this MPZ to the binomial coefficient this over k.
    MPZ.binUiAssign(MPZ n, long k)
    Set this MPZ to the binomial coefficient n over k.
    static MPZ
    MPZ.binUiUi(long n, long k)
    Return an MPZ whose value is the binomial coefficient n over k.
    MPZ.binUiUiAssign(long n, long k)
    Set this MPZ to the binomial coefficient n over k.
    static MPZ
    MPZ.bufferImport(int order, int size, int endian, long nails, ByteBuffer op)
    Return an MPZ whose value is determined from the buffer of word data at op.
    MPZ.bufferImportAssign(int order, int size, int endian, long nails, ByteBuffer op)
    Set this MPZ from the buffer of word data at op.
    MPZ.cdivq(MPZ d)
    Return an MPZ whose value is the quotient of the integer division (this / d), rounded towards +∞.
    MPZ.cdivq2Exp(long b)
    Return an MPZ whose value is the quotient of the integer division (this / 2b), rounded towards +∞.
    MPZ.cdivq2ExpAssign(long b)
    Set this MPZ to the quotient of the integer division (this / 2b), rounded toward +∞.
    MPZ.cdivq2ExpAssign(MPZ n, long b)
    Set this MPZ to the quotient of the integer division (n / 2b), rounded toward +∞.
    Set this MPZ to the quotient of the integer division (this / d), rounded towards +∞.
    MPZ.cdivqAssign(MPZ n, MPZ d)
    Set this MPZ to the quotient of the integer division (n / d), rounded towards +∞.
    MPZ.cdivqrAssign(MPZ r, MPZ d)
    Set this MPZ and r to the quotient and remainder of the integer division (this / d), rounded towards +∞.
    MPZ.cdivqrAssign(MPZ r, MPZ n, MPZ d)
    Set this MPZ and r to the quotient and remainder of the integer division (n / d), rounded towards +∞.
    MPZ.cdivr(MPZ d)
    Return an MPZ whose value is the remainder of the integer division (this / d), rounded towards +∞.
    MPZ.cdivr2Exp(long b)
    Return an MPZ whose value is the remainder of the integer division (this / 2b), rounded towards +∞.
    MPZ.cdivr2ExpAssign(long b)
    Set this MPZ to the remainder of the integer division (this / 2b), rounded toward +∞.
    MPZ.cdivr2ExpAssign(MPZ n, long b)
    Set this MPZ to the remainder of the integer division (n / 2b), rounded toward +∞.
    Set this MPZ to the remainder of the integer division (this / d), rounded towards +∞.
    MPZ.cdivrAssign(MPZ n, MPZ d)
    Set this MPZ to the remainder of the integer division (n / d), rounded towards +∞.
    MPZ.clrbit(long index)
    Return an MPZ whose value is (this & ~ 2index).
    MPZ.clrbitAssign(long index)
    Clear the bit index of this MPZ.
    MPZ.com()
    Return an MPZ whose value is (~ op).
    MPZ.comAssign()
    Set this MPZ to (~ this).
    MPZ.comAssign(MPZ op)
    Set this MPZ to (~ op).
    MPZ.combit(long index)
    Return an MPZ whose value is (this ^ 2index).
    MPZ.combitAssign(long index)
    Complement the bit index of this MPZ.
    static MPZ
    MPZ.dfacUi(long n)
    Return an MPZ whose value the double factorial of n.
    MPZ.dfacUiAssign(long n)
    Set this MPZ to the double factorial of n.
    MPZ.divexact(MPZ d)
    Return an MPZ whose value is the quotient of (this / d).
    Set this MPZ to the quotient of (this / d).
    MPZ.divexactAssign(MPZ n, MPZ d)
    Set this MPZ to the quotient of (n / d).
    MPZ.divexactUi(long d)
    Return an MPZ whose value is the quotient of (this / d).
    MPZ.divexactUiAssign(long d)
    Set this MPZ to the quotient of (this / d).
    MPZ.divexactUiAssign(MPZ n, long d)
    Set this MPZ to the quotient of (n / d).
    static MPZ
    MPZ.facUi(long n)
    Return an MPZ whose value is the factorial of n.
    MPZ.facUiAssign(long n)
    Set this MPZ to the factorial of n.
    MPZ.fdivq(MPZ d)
    Return an MPZ whose value is the quotient of the integer division (this / d), rounded towards -∞.
    MPZ.fdivq2Exp(long b)
    Return an MPZ whose value is the quotient of the integer division (this / 2b), rounded towards -∞.
    MPZ.fdivq2ExpAssign(long b)
    Set this MPZ to the quotient of the integer division (this / 2b), rounded toward -∞.
    MPZ.fdivq2ExpAssign(MPZ n, long b)
    Set this MPZ to the quotient of the integer division (n / 2b), rounded toward -∞.
    Set this MPZ to the quotient of the integer division (this / d), rounded towards -∞.
    MPZ.fdivqAssign(MPZ n, MPZ d)
    Set this MPZ to the quotient of the integer division (n / d), rounded towards -∞.
    MPZ.fdivqrAssign(MPZ r, MPZ d)
    Set this MPZ and r to the quotient and remainder of the integer division (this / d), rounded towards -∞.
    MPZ.fdivqrAssign(MPZ r, MPZ n, MPZ d)
    Set this MPZ and r to the quotient and remainder of the integer division (n / d), rounded towards -∞.
    MPZ.fdivr(MPZ d)
    Return an MPZ whose value is the remainder of the integer division (this / d), rounded towards -∞.
    MPZ.fdivr2Exp(long b)
    Return an MPZ whose value is the remainder of the integer division (this / 2b), rounded towards -∞.
    MPZ.fdivr2ExpAssign(long b)
    Set this MPZ to the remainder of the integer division (this / 2b), rounded toward -∞.
    MPZ.fdivr2ExpAssign(MPZ n, long b)
    Set this MPZ to the remainder of the integer division (n / 2b), rounded toward -∞.
    Set this MPZ to the remainder of the integer division (this / d), rounded towards -∞.
    MPZ.fdivrAssign(MPZ n, MPZ d)
    Set this MPZ to the remainder of the integer division (n / d), rounded towards -∞.
    MPZ.fib2UiAssign(MPZ fnsub1, long n)
    Set the value of this and fnsub1 to the n-th and (n-1)-th Fibonacci numbers respecively.
    static MPZ
    MPZ.fibUi(long n)
    Return an MPZ whose value is the n-th Fibonacci number.
    MPZ.fibUiAssign(long n)
    Set this MPZ to the n-th Fibonacci number.
    MPZ.gcd(MPZ op)
    Return an MPZ whose value is the greatest commond divisor of this and op.
    MPZ.gcdAssign(MPZ op)
    Set this MPZ to the greatest commond divisor of this and op.
    MPZ.gcdAssign(MPZ op1, MPZ op2)
    Set this MPZ to the greatest commond divisor of op1 and op2.
    MPZ.gcdextAssign(MPZ s, MPZ t, MPZ op)
    Set this MPZ to the greatest common divisor of this and op, and in addition Set s and t to coefficients satisfying (this*s + op*t = gcd).
    MPZ.gcdextAssign(MPZ s, MPZ t, MPZ a, MPZ b)
    Set this MPZ to the greatest common divisor of a and b, and in addition Set s and t to coefficients satisfying (a*s + b*t = gcd).
    MPQ.getDen()
    Return the denominator of this.
    MPQ.getNum()
    Return the numerator of this.
    static MPZ
    MPZ.init()
    Return an MPZ whose value is zero.
    static MPZ
    MPZ.init2(long n)
    Return an MPZ whose value is zero, with pre-allocated space for n-bit numbers.
    static MPZ
    MPZ.initSet(double op)
    Return an MPZ whose value is the truncation of op.
    static MPZ
    MPZ.initSet(long op)
    Return an MPZ whose value is op.
    static MPZ
    MPZ.initSet(MPZ op)
    Return an MPZ whose value is op.
    static MPZ
    MPZ.initSetUi(long op)
    Return an MPZ whose value is op.
    MPZ.ior(MPZ op)
    Return an MPZ whose value is (this | op).
    MPZ.iorAssign(MPZ op)
    Set this MPZ to (this | op).
    MPZ.iorAssign(MPZ op1, MPZ op2)
    Set this MPZ to (op1 | op2).
    MPZ.lcm(MPZ op)
    Return an MPZ whose value is the least common multiple of this and op.
    MPZ.lcmAssign(MPZ op)
    Set this MPZ to the least common multiple of this and op.
    MPZ.lcmAssign(MPZ op1, MPZ op2)
    Set this MPZ to the least common multiple of op1 and op2.
    MPZ.lcmUi(long op)
    Return the least common multiple of this and op.
    MPZ.lcmUiAssign(long op)
    Set this MPZ to the least common multiple of this and op.
    MPZ.lcmUiAssign(MPZ op1, long op2)
    Set this MPZ to the least common multiple of op1 and op2.
    MPZ.lucnum2UiAssign(MPZ fnsub1, long n)
    Set the value of this and fnsub1 to the n-th and (n-1)-th Lucas numbers respecively.
    static MPZ
    MPZ.lucnumUi(long n)
    Return an MPZ whose value is the n-th Lucas number.
    MPZ.lucnumUiAssign(long n)
    Set this MPZ to the n-th Lucas number.
    static MPZ
    MPZ.mfacUiUi(long n, long m)
    Return an MPZ whose value is the m-multi factorial of n.
    MPZ.mfacUiUiAssign(long n, long m)
    Set this MPZ to the m-multi factorial of n.
    MPZ.mod(MPZ d)
    Return an MPZ whose value is (this mod d).
    MPZ.modAssign(MPZ d)
    Set this MPZ to (this mod d).
    MPZ.modAssign(MPZ n, MPZ d)
    Set this MPZ to (n mod d).
    MPZ.mul(long op)
    Return an MPZ whose value is (this * op).
    MPZ.mul(MPZ op)
    Return an MPZ whose value is (this * op).
    MPZ.mul2Exp(long b)
    Return an MPZ whose value is (this * 2b).
    MPZ.mul2ExpAssign(long b)
    Set this MPZ to (this * 2b).
    MPZ.mul2ExpAssign(MPZ op, long b)
    Set this MPZ to (op * 2b).
    MPZ.mulAssign(long op)
    Set this MPZ to (this * op)
    MPZ.mulAssign(MPZ op)
    Set this MPZ to (this * op)
    MPZ.mulAssign(MPZ op1, long op2)
    Set this MPZ to (op1 * op2).
    MPZ.mulAssign(MPZ op1, MPZ op2)
    Set this MPZ to (op1 * op2).
    MPZ.mulUi(long op)
    Return an MPZ whose value is (this * op).
    MPZ.mulUiAssign(long op)
    Set this MPZ to (this * op)
    MPZ.mulUiAssign(MPZ op1, long op2)
    Set this MPZ to (op1 * op2).
    MPZ.neg()
    Return an MPZ whose value is the quotient of (- this).
    MPZ.negAssign()
    Set this MPZ to its opposite.
    MPZ.negAssign(MPZ op)
    Set this MPZ to (- op).
    MPZ.nextprime()
    Return an MPZ whose value is the next prime greater then this.
    Set this MPZ to the next prime greater then itself.
    Set this MPZ to the next prime greater then op.
    MPZ.powm(MPZ exp, MPZ mod)
    Return an MPZ whose value is (thisexp) modulo mod.
    MPZ.powmAssign(MPZ exp, MPZ mod)
    Set this MPZ to (thisexp) modulo mod.
    MPZ.powmAssign(MPZ base, MPZ exp, MPZ mod)
    Set this MPZ to (baseexp) modulo mod.
    MPZ.powmSec(MPZ exp, MPZ mod)
    Return an MPZ whose value is (thisexp) modulo mod.
    MPZ.powmSecAssign(MPZ exp, MPZ mod)
    Set this MPZ to (thisexp) modulo mod.
    MPZ.powmSecAssign(MPZ base, MPZ exp, MPZ mod)
    Set this MPZ to (baseexp) modulo mod.
    MPZ.powmUi(long exp, MPZ mod)
    Return an MPZ whose value is (thisexp) modulo mod.
    MPZ.powmUiAssign(long exp, MPZ mod)
    Set this MPZ to (thisexp) modulo mod.
    MPZ.powmUiAssign(MPZ base, long exp, MPZ mod)
    Set this MPZ to (baseexp) modulo mod.
    MPZ.powUi(long exp)
    Return an MPZ whose value is (thisexp).
    static MPZ
    MPZ.powUi(long base, long exp)
    Return an MPZ whose value is (baseexp).
    MPZ.powUiAssign(long exp)
    Set this MPZ to (thisexp).
    MPZ.powUiAssign(long base, long exp)
    Set this MPZ to (baseexp).
    MPZ.powUiAssign(MPZ base, long exp)
    Set this MPZ to (baseexp).
    static MPZ
    MPZ.primorialUi(long n)
    Return an MPZ whose value is the primorial of n, i.e., the product of all positive prime numbers <= n.
    MPZ.primorialUiAssign(long n)
    Set this MPZ to the primorial of n, i.e., the product of all positive prime numbers <= n.
    static MPZ
    MPZ.random(long max_size)
    Deprecated.
    use urandomb(it.unich.jgmp.RandState,long) or urandomm(it.unich.jgmp.RandState,it.unich.jgmp.MPZ) instead, since this method uses a global random state and it is not reentrant.
    static MPZ
    MPZ.random2(long max_size)
    Deprecated.
    use rrandomb(it.unich.jgmp.RandState,long) instead, since this method uses a global random state and it is not reentrant.
    MPZ.random2Assign(long max_size)
    Deprecated.
    use rrandombAssign(it.unich.jgmp.RandState,long) instead, since this method uses a global random state and it is not reentrant.
    MPZ.randomAssign(long max_size)
    Deprecated.
    use urandombAssign(it.unich.jgmp.RandState,long) or urandommAssign(it.unich.jgmp.RandState,it.unich.jgmp.MPZ) instead, since this method uses a global random state and it is not reentrant.
    MPZ.realloc2(long n)
    Changes the space allocated for this number to n bits.
    MPZ.rootremAssign(MPZ rem, long n)
    Set this MPZ to the truncated integer part of the its nth root and rem to the remainder, i.e., (this - rootn).
    MPZ.rootremAssign(MPZ rem, MPZ u, long n)
    Set this MPZ to the truncated integer part of the nth root of u and rem to the remainder, i.e., (u - rootn).
    static MPZ
    MPZ.rrandomb(RandState s, long n)
    Return an MPZ whose value is a random integer with long strings of zeros and ones in the binary representation.
    MPZ.rrandombAssign(RandState s, long n)
    Set this MPZ to a random integer with long strings of zeros and ones in the binary representation.
    MPZ.set(double op)
    Set this MPZ to the truncation of op.
    MPZ.set(long op)
    Set this MPZ to op.
    MPZ.set(MPF op)
    Set this MPZ to the truncation of op.
    MPZ.set(MPQ op)
    Set this MPZ to the truncation of op.
    MPZ.set(MPZ op)
    Set this MPZ to op.
    MPZ.set(BigInteger op)
    Sets this MPZ to op.
    MPZ.setbit(long index)
    Return an MPZ whose value is (this | 2index).
    MPZ.setbitAssign(long index)
    Set the bit index of this MPZ.
    MPZ.setUi(long op)
    Set this MPZ to op.
    MPZ.setValue(double op)
    Set this MPZ to the truncation op op.
    MPZ.setValue(long op)
    Set this MPZ to signed long op.
    MPZ.setValue(MPF op)
    Set this MPZ to the truncation op op.
    MPZ.setValue(MPQ op)
    Set this MPZ to the truncation op op.
    MPZ.setValue(MPZ op)
    Set this MPZ to op.
    MPZ.setValue(String str)
    Set this MPZ to the value represented by the string str in decimal base.
    MPZ.setValue(String str, int base)
    Set this MPZ to the number represented by the string str in the specified base.
    Sets this MPZ to op.
    MPZ.sqrt()
    Return an MPZ whose value is the truncated integer part of the square root of this.
    Set this MPZ to the truncated integer part of its square root.
    MPZ.sqrtAssign(MPZ op)
    Set this MPZ to the truncated integer part of the square root of op.
    MPZ.sqrtremAssign(MPZ rem)
    Set this MPZ to the truncated integer part of its square root and rem to the remainder, i.e., (this - root2).
    MPZ.sqrtremAssign(MPZ rem, MPZ op)
    Set this MPZ to the truncated integer part of the square root of op and rem to the remainder, i.e., (op - root2).
    MPZ.sub(MPZ op)
    Return an MPZ whose value is (this - op).
    MPZ.subAssign(MPZ op)
    Set this MPZ to (this - op)
    MPZ.subAssign(MPZ op1, MPZ op2)
    Set this MPZ to (op1 - op2).
    MPZ.submul(MPZ op1, MPZ op2)
    Return an MPZ whose value is (this - op1 * op2).
    MPZ.submulAssign(MPZ op1, MPZ op2)
    Subtract (op1 * op2) to this MPZ.
    MPZ.submulUi(MPZ op1, long op2)
    Return an MPZ whose value is (this - op1 * op2).
    MPZ.submulUiAssign(MPZ op1, long op2)
    Subtract (op1 * op2) to this MPZ.
    MPZ.subUi(long op)
    Return an MPZ whose value is (this - op).
    MPZ.subUiAssign(long op)
    Set this MPZ to (this - op)
    MPZ.subUiAssign(MPZ op1, long op2)
    Set this MPZ to (op1 - op2).
    MPZ.swap(MPZ op)
    Swap the value of this MPZ with the value of op.
    MPZ.tdivq(MPZ d)
    Return an MPZ whose value is the quotient of the integer division (this / d), rounded towards zero.
    MPZ.tdivq2Exp(long b)
    Return an MPZ whose value is the quotient of the integer division (this / 2b), rounded towards zero.
    MPZ.tdivq2ExpAssign(long b)
    Set this MPZ to the quotient of the integer division (this / 2b), rounded toward zero.
    MPZ.tdivq2ExpAssign(MPZ n, long b)
    Set this MPZ to the quotient of the integer division (n / 2b), rounded toward zero.
    Set this MPZ to the quotient of the integer division (this / d), rounded towards zero.
    MPZ.tdivqAssign(MPZ n, MPZ d)
    Set this MPZ to the quotient of the integer division (n / d), rounded towards zero.
    MPZ.tdivqrAssign(MPZ r, MPZ d)
    Set this MPZ and r to the quotient and remainder of the integer division (this / d), rounded towards zero.
    MPZ.tdivqrAssign(MPZ r, MPZ n, MPZ d)
    Set this MPZ and r to the quotient and remainder of the integer division (n / d), rounded towards zero.
    MPZ.tdivr(MPZ d)
    Return an MPZ whose value is the remainder of the integer division (this / d), rounded towards zero.
    MPZ.tdivr2Exp(long b)
    Return an MPZ whose value is the remainder of the integer division (this / 2b), rounded towards zero.
    MPZ.tdivr2ExpAssign(long b)
    Set this MPZ to the remainder of the integer division (this / 2b), rounded toward zero.
    MPZ.tdivr2ExpAssign(MPZ n, long b)
    Set this MPZ to the remainder of the integer division (n / 2b), rounded toward zero.
    Set this MPZ to the remainder of the integer division (this / d), rounded towards zero.
    MPZ.tdivrAssign(MPZ n, MPZ d)
    Set this MPZ to the remainder of the integer division (n / d), rounded towards zero.
    MPZ.uiSub(long op)
    Return an MPZ whose value is (op - this).
    MPZ.uiSubAssign(long op)
    Set this MPZ to (op - this)
    MPZ.uiSubAssign(long op1, MPZ op2)
    Set this MPZ to (op1 - op2).
    static MPZ
    MPZ.urandomb(RandState s, long n)
    Return an MPZ whose value is an uniformly distributed random integer in the range 0} to (2n - 1), inclusive.
    MPZ.urandombAssign(RandState s, long n)
    Set this MPZ to a uniformly distributed random integer in the range 0 to (2n - 1), inclusive.
    static MPZ
    MPZ.urandomm(RandState s, MPZ n)
    Return an MPZ whose value is an uniformly distributed random integer in the range 0 to (n - 1), inclusive.
    Set this MPZ to a uniformly distributed random integer in the range 0 to (n - 1), inclusive.
    MPZ.xor(MPZ op)
    Return an MPZ whose value is (this ^ op).
    MPZ.xorAssign(MPZ op)
    Set this MPZ to (this ^ op).
    MPZ.xorAssign(MPZ op1, MPZ op2)
    Set this MPZ to (op1 ^ op2).
    Methods in it.unich.jgmp that return types with arguments of type MPZ
    Modifier and Type
    Method
    Description
    org.javatuples.Pair<MPZ,MPZ>
    MPZ.cdivqr(MPZ d)
    Return a pair of MPZs whose values are the quotient and remainder of the integer division (this / d), rounded towards +∞.
    org.javatuples.Pair<MPZ,MPZ>
    MPZ.cdivqr(MPZ d)
    Return a pair of MPZs whose values are the quotient and remainder of the integer division (this / d), rounded towards +∞.
    org.javatuples.Pair<MPZ,MPZ>
    MPZ.fdivqr(MPZ d)
    Return two MPZs whose values are the quotient and remainder of the integer division (this / d), rounded towards -∞.
    org.javatuples.Pair<MPZ,MPZ>
    MPZ.fdivqr(MPZ d)
    Return two MPZs whose values are the quotient and remainder of the integer division (this / d), rounded towards -∞.
    static org.javatuples.Pair<MPZ,MPZ>
    MPZ.fib2Ui(long n)
    Return two MPZ whose values are the n-th and (n-1)-th Fibonacci numbers.
    static org.javatuples.Pair<MPZ,MPZ>
    MPZ.fib2Ui(long n)
    Return two MPZ whose values are the n-th and (n-1)-th Fibonacci numbers.
    org.javatuples.Triplet<MPZ,MPZ,MPZ>
    MPZ.gcdext(MPZ op)
    Return the greatest common divisor of this and op, together with numbers s and t satisfying (a*this + b*op = g) See the GMP function mpz_gcdext.
    org.javatuples.Triplet<MPZ,MPZ,MPZ>
    MPZ.gcdext(MPZ op)
    Return the greatest common divisor of this and op, together with numbers s and t satisfying (a*this + b*op = g) See the GMP function mpz_gcdext.
    org.javatuples.Triplet<MPZ,MPZ,MPZ>
    MPZ.gcdext(MPZ op)
    Return the greatest common divisor of this and op, together with numbers s and t satisfying (a*this + b*op = g) See the GMP function mpz_gcdext.
    static org.javatuples.Pair<Integer,MPZ>
    MPZ.initSet(String str, int base)
    Return an MPZ whose value is the number represented by the string str in the specified base.
    MPZ.invert(MPZ op)
    Optionally return, when it exists, an MPZ whose value is the inverse of this modulo op.
    static org.javatuples.Pair<MPZ,MPZ>
    MPZ.lucnum2Ui(long n)
    Return two MPZ whose values are the n-th and (n-1)-th Lucas numbers.
    static org.javatuples.Pair<MPZ,MPZ>
    MPZ.lucnum2Ui(long n)
    Return two MPZ whose values are the n-th and (n-1)-th Lucas numbers.
    org.javatuples.Pair<Long,MPZ>
    MPZ.remove(MPZ f)
    Return the result of removing the factorf from this, together with the number of occurrences which were removed.
    org.javatuples.Pair<Boolean,MPZ>
    MPZ.root(long n)
    Return an MPZ whose value is the truncated integer part of the nth root of this, and a boolean flag which is true when the result is exact.
    org.javatuples.Pair<MPZ,MPZ>
    MPZ.rootrem(long n)
    Return two MPZs whose values are the truncated integer part of the nth root of this and the remainder, i.e., (u - rootn).
    org.javatuples.Pair<MPZ,MPZ>
    MPZ.rootrem(long n)
    Return two MPZs whose values are the truncated integer part of the nth root of this and the remainder, i.e., (u - rootn).
    org.javatuples.Pair<MPZ,MPZ>
    MPZ.sqrtrem()
    Return two MPZs whose values are the truncated integer part of the square root of this and the remainder, i.e., (op - root2).
    org.javatuples.Pair<MPZ,MPZ>
    MPZ.sqrtrem()
    Return two MPZs whose values are the truncated integer part of the square root of this and the remainder, i.e., (op - root2).
    org.javatuples.Pair<MPZ,MPZ>
    MPZ.tdivqr(MPZ d)
    Return two MPZs whose values are the quotient and remainder of the integer division (this / d), rounded towards zero.
    org.javatuples.Pair<MPZ,MPZ>
    MPZ.tdivqr(MPZ d)
    Return two MPZs whose values are the quotient and remainder of the integer division (this / d), rounded towards zero.
    Methods in it.unich.jgmp with parameters of type MPZ
    Modifier and Type
    Method
    Description
    MPZ.absAssign(MPZ op)
    Set this MPZ to the absolute value of op.
    MPZ.add(MPZ op)
    Return an MPZ whose value is (this + op).
    MPZ.addAssign(MPZ op)
    Set this MPZ to (this + op)
    MPZ.addAssign(MPZ op1, MPZ op2)
    Set this MPZ to (op1 + op2).
    MPZ.addmul(MPZ op1, MPZ op2)
    Return an MPZ whose value is (this + op1 * op2).
    MPZ.addmulAssign(MPZ op1, MPZ op2)
    Add (op1 * op2) to this MPZ.
    MPZ.addmulUi(MPZ op1, long op2)
    Return an MPZ whose value is (this + op1 * op2).
    MPZ.addmulUiAssign(MPZ op1, long op2)
    Add (op1 * op2) to this MPZ.
    MPZ.addUiAssign(MPZ op1, long op2)
    Set this MPZ to (op1 + op2).
    MPZ.and(MPZ op)
    Return an MPZ whose value is (this & op).
    MPZ.andAssign(MPZ op)
    Set this MPZ to (this & op).
    MPZ.andAssign(MPZ op1, MPZ op2)
    Set this MPZ to (op1 & op2).
    MPZ.binUiAssign(MPZ n, long k)
    Set this MPZ to the binomial coefficient n over k.
    MPZ.cdivq(MPZ d)
    Return an MPZ whose value is the quotient of the integer division (this / d), rounded towards +∞.
    MPZ.cdivq2ExpAssign(MPZ n, long b)
    Set this MPZ to the quotient of the integer division (n / 2b), rounded toward +∞.
    Set this MPZ to the quotient of the integer division (this / d), rounded towards +∞.
    MPZ.cdivqAssign(MPZ n, MPZ d)
    Set this MPZ to the quotient of the integer division (n / d), rounded towards +∞.
    org.javatuples.Pair<MPZ,MPZ>
    MPZ.cdivqr(MPZ d)
    Return a pair of MPZs whose values are the quotient and remainder of the integer division (this / d), rounded towards +∞.
    MPZ.cdivqrAssign(MPZ r, MPZ d)
    Set this MPZ and r to the quotient and remainder of the integer division (this / d), rounded towards +∞.
    MPZ.cdivqrAssign(MPZ r, MPZ n, MPZ d)
    Set this MPZ and r to the quotient and remainder of the integer division (n / d), rounded towards +∞.
    long
    MPZ.cdivqrUiAssign(MPZ r, long d)
    Set this MPZ and r to the quotient and remainder of the integer division (this / d), rounded towards +∞; it also returns the remainder.
    long
    MPZ.cdivqrUiAssign(MPZ r, MPZ n, long d)
    Set this MPZ and r to the quotient and remainder of the integer division (n / d), rounded towards +∞; it also returns the remainder.
    long
    MPZ.cdivqUiAssign(MPZ n, long d)
    Set this MPZ to the quotient of the integer division (n / d), rounded towards +∞; it also Return the remainder.
    MPZ.cdivr(MPZ d)
    Return an MPZ whose value is the remainder of the integer division (this / d), rounded towards +∞.
    MPZ.cdivr2ExpAssign(MPZ n, long b)
    Set this MPZ to the remainder of the integer division (n / 2b), rounded toward +∞.
    Set this MPZ to the remainder of the integer division (this / d), rounded towards +∞.
    MPZ.cdivrAssign(MPZ n, MPZ d)
    Set this MPZ to the remainder of the integer division (n / d), rounded towards +∞.
    long
    MPZ.cdivrUiAssign(MPZ n, long d)
    Set this MPZ to the remainder of the integer division (n / d), rounded towards +∞; it also returns the remainder.
    int
    MPF.cmp(MPZ op)
    Compare this with op.
    int
    MPQ.cmp(MPZ op)
    Compare this with op.
    int
    MPZ.cmp(MPZ op)
    Compare this with op.
    int
    MPZ.cmpabs(MPZ op)
    Compare the absolute values of this and op.
    MPZ.comAssign(MPZ op)
    Set this MPZ to (~ op).
    int
    MPZ.compareTo(MPZ op)
    Compare this MPZ with op.
    MPZ.divexact(MPZ d)
    Return an MPZ whose value is the quotient of (this / d).
    Set this MPZ to the quotient of (this / d).
    MPZ.divexactAssign(MPZ n, MPZ d)
    Set this MPZ to the quotient of (n / d).
    MPZ.divexactUiAssign(MPZ n, long d)
    Set this MPZ to the quotient of (n / d).
    MPZ.fdivq(MPZ d)
    Return an MPZ whose value is the quotient of the integer division (this / d), rounded towards -∞.
    MPZ.fdivq2ExpAssign(MPZ n, long b)
    Set this MPZ to the quotient of the integer division (n / 2b), rounded toward -∞.
    Set this MPZ to the quotient of the integer division (this / d), rounded towards -∞.
    MPZ.fdivqAssign(MPZ n, MPZ d)
    Set this MPZ to the quotient of the integer division (n / d), rounded towards -∞.
    org.javatuples.Pair<MPZ,MPZ>
    MPZ.fdivqr(MPZ d)
    Return two MPZs whose values are the quotient and remainder of the integer division (this / d), rounded towards -∞.
    MPZ.fdivqrAssign(MPZ r, MPZ d)
    Set this MPZ and r to the quotient and remainder of the integer division (this / d), rounded towards -∞.
    MPZ.fdivqrAssign(MPZ r, MPZ n, MPZ d)
    Set this MPZ and r to the quotient and remainder of the integer division (n / d), rounded towards -∞.
    long
    MPZ.fdivqrUiAssign(MPZ r, long d)
    Set this MPZ and r to the quotient and remainder of the integer division (this / d), rounded towards -∞; it also returns the absolute value of the remainder.
    long
    MPZ.fdivqrUiAssign(MPZ r, MPZ n, long d)
    Set this MPZ and r to the quotient and remainder of the integer division (n / d), rounded towards -∞; it also returns the absolute value of the remainder.
    long
    MPZ.fdivqUiAssign(MPZ n, long d)
    Set this MPZ to the quotient of the integer division (n / d), rounded towards -∞; it also returns the absolute value of the remainder.
    MPZ.fdivr(MPZ d)
    Return an MPZ whose value is the remainder of the integer division (this / d), rounded towards -∞.
    MPZ.fdivr2ExpAssign(MPZ n, long b)
    Set this MPZ to the remainder of the integer division (n / 2b), rounded toward -∞.
    Set this MPZ to the remainder of the integer division (this / d), rounded towards -∞.
    MPZ.fdivrAssign(MPZ n, MPZ d)
    Set this MPZ to the remainder of the integer division (n / d), rounded towards -∞.
    long
    MPZ.fdivrUiAssign(MPZ n, long d)
    Set this MPZ to the remainder of the integer division (n / d), rounded towards -∞; it also returns the absolute value of the remainder.
    MPZ.fib2UiAssign(MPZ fnsub1, long n)
    Set the value of this and fnsub1 to the n-th and (n-1)-th Fibonacci numbers respecively.
    MPZ.gcd(MPZ op)
    Return an MPZ whose value is the greatest commond divisor of this and op.
    MPZ.gcdAssign(MPZ op)
    Set this MPZ to the greatest commond divisor of this and op.
    MPZ.gcdAssign(MPZ op1, MPZ op2)
    Set this MPZ to the greatest commond divisor of op1 and op2.
    org.javatuples.Triplet<MPZ,MPZ,MPZ>
    MPZ.gcdext(MPZ op)
    Return the greatest common divisor of this and op, together with numbers s and t satisfying (a*this + b*op = g) See the GMP function mpz_gcdext.
    MPZ.gcdextAssign(MPZ s, MPZ t, MPZ op)
    Set this MPZ to the greatest common divisor of this and op, and in addition Set s and t to coefficients satisfying (this*s + op*t = gcd).
    MPZ.gcdextAssign(MPZ s, MPZ t, MPZ a, MPZ b)
    Set this MPZ to the greatest common divisor of a and b, and in addition Set s and t to coefficients satisfying (a*s + b*t = gcd).
    long
    MPZ.gcdUiAssign(MPZ op1, long op2)
    Set this MPZ to the greatest commond divisor of op1 and op2, and return it.
    long
    MPZ.hamdist(MPZ op)
    If this and op are both >= 0 or both < 0, return the Hamming distance between them, which is the number of bit positions where this and op have different bit values.
    static MPZ
    MPZ.initSet(MPZ op)
    Return an MPZ whose value is op.
    MPZ.invert(MPZ op)
    Optionally return, when it exists, an MPZ whose value is the inverse of this modulo op.
    boolean
    MPZ.invertAssign(MPZ op)
    Set this MPZ to the inverse of this modulo op.
    boolean
    MPZ.invertAssign(MPZ op1, MPZ op2)
    Set this MPZ to the inverse of op1 modulo op2.
    MPZ.ior(MPZ op)
    Return an MPZ whose value is (this | op).
    MPZ.iorAssign(MPZ op)
    Set this MPZ to (this | op).
    MPZ.iorAssign(MPZ op1, MPZ op2)
    Set this MPZ to (op1 | op2).
    boolean
    MPZ.isCongruent(MPZ c, MPZ d)
    Return true if and only if this is congruent to c modulo d.
    boolean
    MPZ.isCongruent2Exp(MPZ c, long b)
    Return true if and only if this is congruent to c modulo 2b.
    boolean
    Return true if and only if this is exactly divisible by d.
    int
    MPZ.jacobi(MPZ b)
    Return the Jacobi symbol (this / b).
    int
    MPZ.kronecker(MPZ b)
    Return the Jacobi symbol (this / n) with the Kronecker extension (this/2)=(2/this) when this is odd, or (this/2)=0 when this is even.
    MPZ.lcm(MPZ op)
    Return an MPZ whose value is the least common multiple of this and op.
    MPZ.lcmAssign(MPZ op)
    Set this MPZ to the least common multiple of this and op.
    MPZ.lcmAssign(MPZ op1, MPZ op2)
    Set this MPZ to the least common multiple of op1 and op2.
    MPZ.lcmUiAssign(MPZ op1, long op2)
    Set this MPZ to the least common multiple of op1 and op2.
    int
    MPZ.legendre(MPZ p)
    Return the Legendre symbol (this / p).
    MPZ.lucnum2UiAssign(MPZ fnsub1, long n)
    Set the value of this and fnsub1 to the n-th and (n-1)-th Lucas numbers respecively.
    MPZ.mod(MPZ d)
    Return an MPZ whose value is (this mod d).
    MPZ.modAssign(MPZ d)
    Set this MPZ to (this mod d).
    MPZ.modAssign(MPZ n, MPZ d)
    Set this MPZ to (n mod d).
    long
    MPZ.modUiAssign(MPZ n, long d)
    Set this MPZ to (n mod d); it also returns the result.
    MPZ.mul(MPZ op)
    Return an MPZ whose value is (this * op).
    MPZ.mul2ExpAssign(MPZ op, long b)
    Set this MPZ to (op * 2b).
    MPZ.mulAssign(MPZ op)
    Set this MPZ to (this * op)
    MPZ.mulAssign(MPZ op1, long op2)
    Set this MPZ to (op1 * op2).
    MPZ.mulAssign(MPZ op1, MPZ op2)
    Set this MPZ to (op1 * op2).
    MPZ.mulUiAssign(MPZ op1, long op2)
    Set this MPZ to (op1 * op2).
    MPZ.negAssign(MPZ op)
    Set this MPZ to (- op).
    Set this MPZ to the next prime greater then op.
    MPZ.powm(MPZ exp, MPZ mod)
    Return an MPZ whose value is (thisexp) modulo mod.
    MPZ.powmAssign(MPZ exp, MPZ mod)
    Set this MPZ to (thisexp) modulo mod.
    MPZ.powmAssign(MPZ base, MPZ exp, MPZ mod)
    Set this MPZ to (baseexp) modulo mod.
    MPZ.powmSec(MPZ exp, MPZ mod)
    Return an MPZ whose value is (thisexp) modulo mod.
    MPZ.powmSecAssign(MPZ exp, MPZ mod)
    Set this MPZ to (thisexp) modulo mod.
    MPZ.powmSecAssign(MPZ base, MPZ exp, MPZ mod)
    Set this MPZ to (baseexp) modulo mod.
    MPZ.powmUi(long exp, MPZ mod)
    Return an MPZ whose value is (thisexp) modulo mod.
    MPZ.powmUiAssign(long exp, MPZ mod)
    Set this MPZ to (thisexp) modulo mod.
    MPZ.powmUiAssign(MPZ base, long exp, MPZ mod)
    Set this MPZ to (baseexp) modulo mod.
    MPZ.powUiAssign(MPZ base, long exp)
    Set this MPZ to (baseexp).
    static RandState
    RandState.randinitLc2Exp(MPZ a, long c, long m2exp)
    Returns a random state for a linear congruential algorithm.
    RandState.randseed(MPZ seed)
    Sets an initial seed value into this.
    org.javatuples.Pair<Long,MPZ>
    MPZ.remove(MPZ f)
    Return the result of removing the factorf from this, together with the number of occurrences which were removed.
    long
    Remove all occurrences of the factor f from this MPZ.
    long
    MPZ.removeAssign(MPZ op, MPZ f)
    Remove all occurrences of the factor f from op and stores the result in this MPZ.
    boolean
    MPZ.rootAssign(MPZ op, long n)
    Set this MPZ to the truncated integer part of the nth root of op.
    MPZ.rootremAssign(MPZ rem, long n)
    Set this MPZ to the truncated integer part of the its nth root and rem to the remainder, i.e., (this - rootn).
    MPZ.rootremAssign(MPZ rem, MPZ u, long n)
    Set this MPZ to the truncated integer part of the nth root of u and rem to the remainder, i.e., (u - rootn).
    MPF.set(MPZ op)
    Set this MPF to op, possibly truncated according to precision.
    MPQ.set(MPZ op)
    Set this MPQ to op.
    MPZ.set(MPZ op)
    Set this MPZ to op.
    MPQ.setDen(MPZ den)
    Set the denominator of this to the value den.
    MPQ.setNum(MPZ num)
    Set the numerator of this to the value num.
    MPF.setValue(MPZ op)
    Set this MPF to op, possibly truncated according to precision.
    MPZ.setValue(MPZ op)
    Set this MPZ to op.
    MPZ.sqrtAssign(MPZ op)
    Set this MPZ to the truncated integer part of the square root of op.
    MPZ.sqrtremAssign(MPZ rem)
    Set this MPZ to the truncated integer part of its square root and rem to the remainder, i.e., (this - root2).
    MPZ.sqrtremAssign(MPZ rem, MPZ op)
    Set this MPZ to the truncated integer part of the square root of op and rem to the remainder, i.e., (op - root2).
    MPZ.sub(MPZ op)
    Return an MPZ whose value is (this - op).
    MPZ.subAssign(MPZ op)
    Set this MPZ to (this - op)
    MPZ.subAssign(MPZ op1, MPZ op2)
    Set this MPZ to (op1 - op2).
    MPZ.submul(MPZ op1, MPZ op2)
    Return an MPZ whose value is (this - op1 * op2).
    MPZ.submulAssign(MPZ op1, MPZ op2)
    Subtract (op1 * op2) to this MPZ.
    MPZ.submulUi(MPZ op1, long op2)
    Return an MPZ whose value is (this - op1 * op2).
    MPZ.submulUiAssign(MPZ op1, long op2)
    Subtract (op1 * op2) to this MPZ.
    MPZ.subUiAssign(MPZ op1, long op2)
    Set this MPZ to (op1 - op2).
    MPZ.swap(MPZ op)
    Swap the value of this MPZ with the value of op.
    MPZ.tdivq(MPZ d)
    Return an MPZ whose value is the quotient of the integer division (this / d), rounded towards zero.
    MPZ.tdivq2ExpAssign(MPZ n, long b)
    Set this MPZ to the quotient of the integer division (n / 2b), rounded toward zero.
    Set this MPZ to the quotient of the integer division (this / d), rounded towards zero.
    MPZ.tdivqAssign(MPZ n, MPZ d)
    Set this MPZ to the quotient of the integer division (n / d), rounded towards zero.
    org.javatuples.Pair<MPZ,MPZ>
    MPZ.tdivqr(MPZ d)
    Return two MPZs whose values are the quotient and remainder of the integer division (this / d), rounded towards zero.
    MPZ.tdivqrAssign(MPZ r, MPZ d)
    Set this MPZ and r to the quotient and remainder of the integer division (this / d), rounded towards zero.
    MPZ.tdivqrAssign(MPZ r, MPZ n, MPZ d)
    Set this MPZ and r to the quotient and remainder of the integer division (n / d), rounded towards zero.
    long
    MPZ.tdivqrUiAssign(MPZ r, long d)
    Set this MPZ and r to the quotient and remainder of the integer division (this / d), rounded towards zero; it also returns the absolute value of the remainder.
    long
    MPZ.tdivqrUiAssign(MPZ r, MPZ n, long d)
    Set this MPZ and r to the quotient and remainder of the integer division (n / d), rounded towards zero; it also returns the absolute value of the remainder.
    long
    MPZ.tdivqUiAssign(MPZ n, long d)
    Set this MPZ to the quotient of the integer division (n / d), rounded towards zero; it also returns the absolute value of the remainder.
    MPZ.tdivr(MPZ d)
    Return an MPZ whose value is the remainder of the integer division (this / d), rounded towards zero.
    MPZ.tdivr2ExpAssign(MPZ n, long b)
    Set this MPZ to the remainder of the integer division (n / 2b), rounded toward zero.
    Set this MPZ to the remainder of the integer division (this / d), rounded towards zero.
    MPZ.tdivrAssign(MPZ n, MPZ d)
    Set this MPZ to the remainder of the integer division (n / d), rounded towards zero.
    long
    MPZ.tdivrUiAssign(MPZ n, long d)
    Set this MPZ to the remainder of the integer division (n / d), rounded towards zero; it also returns the absolute value of the remainder.
    MPZ.uiSubAssign(long op1, MPZ op2)
    Set this MPZ to (op1 - op2).
    static MPZ
    MPZ.urandomm(RandState s, MPZ n)
    Return an MPZ whose value is an uniformly distributed random integer in the range 0 to (n - 1), inclusive.
    Set this MPZ to a uniformly distributed random integer in the range 0 to (n - 1), inclusive.
    MPZ.xor(MPZ op)
    Return an MPZ whose value is (this ^ op).
    MPZ.xorAssign(MPZ op)
    Set this MPZ to (this ^ op).
    MPZ.xorAssign(MPZ op1, MPZ op2)
    Set this MPZ to (op1 ^ op2).
    Constructors in it.unich.jgmp with parameters of type MPZ
    Modifier
    Constructor
    Description
     
    MPF(MPZ op)
    Build an MPF whose value is op, possibly truncated to the default precision.
     
    MPQ(MPZ op)
    Build an MPQ whose value is op.
     
    MPZ(MPZ op)
    Build an MPZ whose value is op.