Uses of Class
it.unich.jgmp.MPZ
-
Packages that use MPZ Package Description it.unich.jgmp 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 MPZMPZ. abs()Return anMPZwhose value is the absolute value ofthis.MPZMPZ. absAssign()Set thisMPZto its absolute value.MPZMPZ. absAssign(MPZ op)Set thisMPZto the absolute value ofop.MPZMPZ. add(MPZ op)Return anMPZwhose value is(this + op).MPZMPZ. addAssign(MPZ op)Set thisMPZto(this + op)MPZMPZ. addAssign(MPZ op1, MPZ op2)Set thisMPZto(op1 + op2).MPZMPZ. addmul(MPZ op1, MPZ op2)Return anMPZwhose value is(this + op1 * op2).MPZMPZ. addmulAssign(MPZ op1, MPZ op2)Add(op1 * op2)to thisMPZ.MPZMPZ. addmulUi(MPZ op1, long op2)Return anMPZwhose value is(this + op1 * op2).MPZMPZ. addmulUiAssign(MPZ op1, long op2)Add(op1 * op2)to thisMPZ.MPZMPZ. addUi(long op)Return anMPZwhose value is(this + op).MPZMPZ. addUiAssign(long op)Set thisMPZto(this + op)MPZMPZ. addUiAssign(MPZ op1, long op2)Set thisMPZto(op1 + op2).MPZMPZ. and(MPZ op)Return anMPZwhose value is(this & op).MPZMPZ. andAssign(MPZ op)Set thisMPZto(this & op).MPZMPZ. andAssign(MPZ op1, MPZ op2)Set thisMPZto(op1 & op2).MPZMPZ. binUi(long k)Return anMPZwhose value is the binomial coefficientthisoverk.MPZMPZ. binUiAssign(long k)Set thisMPZto the binomial coefficientthisoverk.MPZMPZ. binUiAssign(MPZ n, long k)Set thisMPZto the binomial coefficientnoverk.static MPZMPZ. binUiUi(long n, long k)Return anMPZwhose value is the binomial coefficientnoverk.MPZMPZ. binUiUiAssign(long n, long k)Set thisMPZto the binomial coefficientnoverk.static MPZMPZ. bufferImport(int order, int size, int endian, long nails, java.nio.ByteBuffer op)Return anMPZwhose value is determined from the buffer of word data atop.MPZMPZ. bufferImportAssign(int order, int size, int endian, long nails, java.nio.ByteBuffer op)Set thisMPZfrom the buffer of word data atop.MPZMPZ. cdivq(MPZ d)Return anMPZwhose value is the quotient of the integer division(this / d), rounded towards +∞.MPZMPZ. cdivq2Exp(long b)Return anMPZwhose value is the quotient of the integer division(this / 2b), rounded towards +∞.MPZMPZ. cdivq2ExpAssign(long b)Set thisMPZto the quotient of the integer division(this / 2b), rounded toward +∞.MPZMPZ. cdivq2ExpAssign(MPZ n, long b)Set thisMPZto the quotient of the integer division(n / 2b), rounded toward +∞.MPZMPZ. cdivqAssign(MPZ d)Set thisMPZto the quotient of the integer division(this / d), rounded towards +∞.MPZMPZ. cdivqAssign(MPZ n, MPZ d)Set thisMPZto the quotient of the integer division(n / d), rounded towards +∞.MPZMPZ. cdivqrAssign(MPZ r, MPZ d)Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards +∞.MPZMPZ. cdivqrAssign(MPZ r, MPZ n, MPZ d)Set thisMPZandrto the quotient and remainder of the integer division(n / d), rounded towards +∞.MPZMPZ. cdivr(MPZ d)Return anMPZwhose value is the remainder of the integer division(this / d), rounded towards +∞.MPZMPZ. cdivr2Exp(long b)Return anMPZwhose value is the remainder of the integer division(this / 2b), rounded towards +∞.MPZMPZ. cdivr2ExpAssign(long b)Set thisMPZto the remainder of the integer division(this / 2b), rounded toward +∞.MPZMPZ. cdivr2ExpAssign(MPZ n, long b)Set thisMPZto the remainder of the integer division(n / 2b), rounded toward +∞.MPZMPZ. cdivrAssign(MPZ d)Set thisMPZto the remainder of the integer division(this / d), rounded towards +∞.MPZMPZ. cdivrAssign(MPZ n, MPZ d)Set thisMPZto the remainder of the integer division(n / d), rounded towards +∞.MPZMPZ. clrbit(long index)Return anMPZwhose value is(this & ~ 2index).MPZMPZ. clrbitAssign(long index)Clear the bitindexof thisMPZ.MPZMPZ. com()Return anMPZwhose value is(~ op).MPZMPZ. comAssign()Set thisMPZto(~ this).MPZMPZ. comAssign(MPZ op)Set thisMPZto(~ op).MPZMPZ. combit(long index)Return anMPZwhose value is(this ^ 2index).MPZMPZ. combitAssign(long index)Complement the bitindexof thisMPZ.static MPZMPZ. dfacUi(long n)Return anMPZwhose value the double factorial ofn.MPZMPZ. dfacUiAssign(long n)Set thisMPZto the double factorial ofn.MPZMPZ. divexact(MPZ d)Return anMPZwhose value is the quotient of(this / d).MPZMPZ. divexactAssign(MPZ d)Set thisMPZto the quotient of(this / d).MPZMPZ. divexactAssign(MPZ n, MPZ d)Set thisMPZto the quotient of(n / d).MPZMPZ. divexactUi(long d)Return anMPZwhose value is the quotient of(this / d).MPZMPZ. divexactUiAssign(long d)Set thisMPZto the quotient of(this / d).MPZMPZ. divexactUiAssign(MPZ n, long d)Set thisMPZto the quotient of(n / d).static MPZMPZ. facUi(long n)Return anMPZwhose value is the factorial ofn.MPZMPZ. facUiAssign(long n)Set thisMPZto the factorial ofn.MPZMPZ. fdivq(MPZ d)Return anMPZwhose value is the quotient of the integer division(this / d), rounded towards -∞.MPZMPZ. fdivq2Exp(long b)Return anMPZwhose value is the quotient of the integer division(this / 2b), rounded towards -∞.MPZMPZ. fdivq2ExpAssign(long b)Set thisMPZto the quotient of the integer division(this / 2b), rounded toward -∞.MPZMPZ. fdivq2ExpAssign(MPZ n, long b)Set thisMPZto the quotient of the integer division(n / 2b), rounded toward -∞.MPZMPZ. fdivqAssign(MPZ d)Set thisMPZto the quotient of the integer division(this / d), rounded towards -∞.MPZMPZ. fdivqAssign(MPZ n, MPZ d)Set thisMPZto the quotient of the integer division(n / d), rounded towards -∞.MPZMPZ. fdivqrAssign(MPZ r, MPZ d)Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards -∞.MPZMPZ. fdivqrAssign(MPZ r, MPZ n, MPZ d)Set thisMPZandrto the quotient and remainder of the integer division(n / d), rounded towards -∞.MPZMPZ. fdivr(MPZ d)Return anMPZwhose value is the remainder of the integer division(this / d), rounded towards -∞.MPZMPZ. fdivr2Exp(long b)Return anMPZwhose value is the remainder of the integer division(this / 2b), rounded towards -∞.MPZMPZ. fdivr2ExpAssign(long b)Set thisMPZto the remainder of the integer division(this / 2b), rounded toward -∞.MPZMPZ. fdivr2ExpAssign(MPZ n, long b)Set thisMPZto the remainder of the integer division(n / 2b), rounded toward -∞.MPZMPZ. fdivrAssign(MPZ d)Set thisMPZto the remainder of the integer division(this / d), rounded towards -∞.MPZMPZ. fdivrAssign(MPZ n, MPZ d)Set thisMPZto the remainder of the integer division(n / d), rounded towards -∞.MPZMPZ. fib2UiAssign(MPZ fnsub1, long n)Set the value ofthisandfnsub1to then-th and(n-1)-th Fibonacci numbers respecively.static MPZMPZ. fibUi(long n)Return anMPZwhose value is then-th Fibonacci number.MPZMPZ. fibUiAssign(long n)Set thisMPZto then-th Fibonacci number.MPZMPZ. gcd(MPZ op)Return anMPZwhose value is the greatest commond divisor ofthisandop.MPZMPZ. gcdAssign(MPZ op)Set thisMPZto the greatest commond divisor ofthisandop.MPZMPZ. gcdAssign(MPZ op1, MPZ op2)Set thisMPZto the greatest commond divisor ofop1andop2.MPZMPZ. gcdextAssign(MPZ s, MPZ t, MPZ op)Set thisMPZto the greatest common divisor ofthisandop, and in addition Setsandtto coefficients satisfying(this*s + op*t = gcd).MPZMPZ. gcdextAssign(MPZ s, MPZ t, MPZ a, MPZ b)Set thisMPZto the greatest common divisor ofaandb, and in addition Setsandtto coefficients satisfying(a*s + b*t = gcd).MPZMPQ. getDen()Return the denominator ofthis.MPZMPQ. getNum()Return the numerator ofthis.static MPZMPZ. init()Return anMPZwhose value is zero.static MPZMPZ. init2(long n)Return anMPZwhose value is zero, with pre-allocated space forn-bit numbers.static MPZMPZ. initSet(double op)Return anMPZwhose value is the truncation ofop.static MPZMPZ. initSet(long op)Return anMPZwhose value isop.static MPZMPZ. initSet(MPZ op)Return anMPZwhose value isop.static MPZMPZ. initSetUi(long op)Return anMPZwhose value isop.MPZMPZ. ior(MPZ op)Return anMPZwhose value is(this | op).MPZMPZ. iorAssign(MPZ op)Set thisMPZto(this | op).MPZMPZ. iorAssign(MPZ op1, MPZ op2)Set thisMPZto(op1 | op2).MPZMPZ. lcm(MPZ op)Return anMPZwhose value is the least common multiple ofthisandop.MPZMPZ. lcmAssign(MPZ op)Set thisMPZto the least common multiple ofthisandop.MPZMPZ. lcmAssign(MPZ op1, MPZ op2)Set thisMPZto the least common multiple ofop1andop2.MPZMPZ. lcmUi(long op)Return the least common multiple ofthisandop.MPZMPZ. lcmUiAssign(long op)Set thisMPZto the least common multiple ofthisandop.MPZMPZ. lcmUiAssign(MPZ op1, long op2)Set thisMPZto the least common multiple ofop1andop2.MPZMPZ. lucnum2UiAssign(MPZ fnsub1, long n)Set the value ofthisandfnsub1to then-th and(n-1)-th Lucas numbers respecively.static MPZMPZ. lucnumUi(long n)Return anMPZwhose value is then-th Lucas number.MPZMPZ. lucnumUiAssign(long n)Set thisMPZto then-th Lucas number.static MPZMPZ. mfacUiUi(long n, long m)Return anMPZwhose value is them-multi factorial ofn.MPZMPZ. mfacUiUiAssign(long n, long m)Set thisMPZto them-multi factorial ofn.MPZMPZ. mod(MPZ d)Return anMPZwhose value is(this mod d).MPZMPZ. modAssign(MPZ d)Set thisMPZto(this mod d).MPZMPZ. modAssign(MPZ n, MPZ d)Set thisMPZto(n mod d).MPZMPZ. mul(long op)Return anMPZwhose value is(this * op).MPZMPZ. mul(MPZ op)Return anMPZwhose value is(this * op).MPZMPZ. mul2Exp(long b)Return anMPZwhose value is(this * 2b).MPZMPZ. mul2ExpAssign(long b)Set thisMPZto(this * 2b).MPZMPZ. mul2ExpAssign(MPZ op, long b)Set thisMPZto(op * 2b).MPZMPZ. mulAssign(long op)Set thisMPZto(this * op)MPZMPZ. mulAssign(MPZ op)Set thisMPZto(this * op)MPZMPZ. mulAssign(MPZ op1, long op2)Set thisMPZto(op1 * op2).MPZMPZ. mulAssign(MPZ op1, MPZ op2)Set thisMPZto(op1 * op2).MPZMPZ. mulUi(long op)Return anMPZwhose value is(this * op).MPZMPZ. mulUiAssign(long op)Set thisMPZto(this * op)MPZMPZ. mulUiAssign(MPZ op1, long op2)Set thisMPZto(op1 * op2).MPZMPZ. neg()Return anMPZwhose value is the quotient of(- this).MPZMPZ. negAssign()Set thisMPZto its opposite.MPZMPZ. negAssign(MPZ op)Set thisMPZto(- op).MPZMPZ. nextprime()Return anMPZwhose value is the next prime greater thenthis.MPZMPZ. nextprimeAssign()Set thisMPZto the next prime greater then itself.MPZMPZ. nextprimeAssign(MPZ op)Set thisMPZto the next prime greater thenop.MPZMPZ. powm(MPZ exp, MPZ mod)Return anMPZwhose value is(thisexp)modulomod.MPZMPZ. powmAssign(MPZ exp, MPZ mod)Set thisMPZto(thisexp)modulomod.MPZMPZ. powmAssign(MPZ base, MPZ exp, MPZ mod)Set thisMPZto(baseexp)modulomod.MPZMPZ. powmSec(MPZ exp, MPZ mod)Return anMPZwhose value is(thisexp)modulomod.MPZMPZ. powmSecAssign(MPZ exp, MPZ mod)Set thisMPZto(thisexp)modulomod.MPZMPZ. powmSecAssign(MPZ base, MPZ exp, MPZ mod)Set thisMPZto(baseexp)modulomod.MPZMPZ. powmUi(long exp, MPZ mod)Return anMPZwhose value is(thisexp)modulomod.MPZMPZ. powmUiAssign(long exp, MPZ mod)Set thisMPZto(thisexp)modulomod.MPZMPZ. powmUiAssign(MPZ base, long exp, MPZ mod)Set thisMPZto(baseexp)modulomod.MPZMPZ. powUi(long exp)Return anMPZwhose value is(thisexp).static MPZMPZ. powUi(long base, long exp)Return anMPZwhose value is(baseexp).MPZMPZ. powUiAssign(long exp)Set thisMPZto(thisexp).MPZMPZ. powUiAssign(long base, long exp)Set thisMPZto(baseexp).MPZMPZ. powUiAssign(MPZ base, long exp)Set thisMPZto(baseexp).static MPZMPZ. primorialUi(long n)Return anMPZwhose value is the primorial ofn, i.e., the product of all positive prime numbers<= n.MPZMPZ. primorialUiAssign(long n)Set thisMPZto the primorial ofn, i.e., the product of all positive prime numbers<= n.static MPZMPZ. random(long max_size)Deprecated.useurandomb(it.unich.jgmp.RandState,long)orurandomm(it.unich.jgmp.RandState,it.unich.jgmp.MPZ)instead, since this method uses a global random state and it is not reentrant.static MPZMPZ. random2(long max_size)Deprecated.userrandomb(it.unich.jgmp.RandState,long)instead, since this method uses a global random state and it is not reentrant.MPZMPZ. random2Assign(long max_size)Deprecated.userrandombAssign(it.unich.jgmp.RandState,long)instead, since this method uses a global random state and it is not reentrant.MPZMPZ. randomAssign(long max_size)Deprecated.useurandombAssign(it.unich.jgmp.RandState,long)orurandommAssign(it.unich.jgmp.RandState,it.unich.jgmp.MPZ)instead, since this method uses a global random state and it is not reentrant.MPZMPZ. realloc2(long n)Changes the space allocated for this number tonbits.MPZMPZ. rootremAssign(MPZ rem, long n)Set thisMPZto the truncated integer part of the itsnth root andremto the remainder, i.e.,(this - rootn).MPZMPZ. rootremAssign(MPZ rem, MPZ u, long n)Set thisMPZto the truncated integer part of thenth root ofuandremto the remainder, i.e.,(u - rootn).static MPZMPZ. rrandomb(RandState s, long n)Return anMPZwhose value is a random integer with long strings of zeros and ones in the binary representation.MPZMPZ. rrandombAssign(RandState s, long n)Set thisMPZto a random integer with long strings of zeros and ones in the binary representation.MPZMPZ. set(double op)Set thisMPZto the truncation ofop.MPZMPZ. set(long op)Set thisMPZtoop.MPZMPZ. set(MPF op)Set thisMPZto the truncation ofop.MPZMPZ. set(MPQ op)Set thisMPZto the truncation ofop.MPZMPZ. set(MPZ op)Set thisMPZtoop.MPZMPZ. set(java.math.BigInteger op)Sets thisMPZtoop.MPZMPZ. setbit(long index)Return anMPZwhose value is(this | 2index).MPZMPZ. setbitAssign(long index)Set the bitindexof thisMPZ.MPZMPZ. setUi(long op)Set thisMPZtoop.MPZMPZ. setValue(double op)Set thisMPZto the truncation opop.MPZMPZ. setValue(long op)Set thisMPZto signed longop.MPZMPZ. setValue(MPF op)Set thisMPZto the truncation opop.MPZMPZ. setValue(MPQ op)Set thisMPZto the truncation opop.MPZMPZ. setValue(MPZ op)Set thisMPZtoop.MPZMPZ. setValue(java.lang.String str)Set thisMPZto the value represented by the stringstrin decimal base.MPZMPZ. setValue(java.lang.String str, int base)Set thisMPZto the number represented by the stringstrin the specifiedbase.MPZMPZ. setValue(java.math.BigInteger op)Sets thisMPZtoop.MPZMPZ. sqrt()Return anMPZwhose value is the truncated integer part of the square root ofthis.MPZMPZ. sqrtAssign()Set thisMPZto the truncated integer part of its square root.MPZMPZ. sqrtAssign(MPZ op)Set thisMPZto the truncated integer part of the square root ofop.MPZMPZ. sqrtremAssign(MPZ rem)Set thisMPZto the truncated integer part of its square root andremto the remainder, i.e.,(this - root2).MPZMPZ. sqrtremAssign(MPZ rem, MPZ op)Set thisMPZto the truncated integer part of the square root ofopandremto the remainder, i.e.,(op - root2).MPZMPZ. sub(MPZ op)Return anMPZwhose value is(this - op).MPZMPZ. subAssign(MPZ op)Set thisMPZto(this - op)MPZMPZ. subAssign(MPZ op1, MPZ op2)Set thisMPZto(op1 - op2).MPZMPZ. submul(MPZ op1, MPZ op2)Return anMPZwhose value is(this - op1 * op2).MPZMPZ. submulAssign(MPZ op1, MPZ op2)Subtract(op1 * op2)to thisMPZ.MPZMPZ. submulUi(MPZ op1, long op2)Return anMPZwhose value is(this - op1 * op2).MPZMPZ. submulUiAssign(MPZ op1, long op2)Subtract(op1 * op2)to thisMPZ.MPZMPZ. subUi(long op)Return anMPZwhose value is(this - op).MPZMPZ. subUiAssign(long op)Set thisMPZto(this - op)MPZMPZ. subUiAssign(MPZ op1, long op2)Set thisMPZto(op1 - op2).MPZMPZ. swap(MPZ op)Swap the value of thisMPZwith the value ofop.MPZMPZ. tdivq(MPZ d)Return anMPZwhose value is the quotient of the integer division(this / d), rounded towards zero.MPZMPZ. tdivq2Exp(long b)Return anMPZwhose value is the quotient of the integer division(this / 2b), rounded towards zero.MPZMPZ. tdivq2ExpAssign(long b)Set thisMPZto the quotient of the integer division(this / 2b), rounded toward zero.MPZMPZ. tdivq2ExpAssign(MPZ n, long b)Set thisMPZto the quotient of the integer division(n / 2b), rounded toward zero.MPZMPZ. tdivqAssign(MPZ d)Set thisMPZto the quotient of the integer division(this / d), rounded towards zero.MPZMPZ. tdivqAssign(MPZ n, MPZ d)Set thisMPZto the quotient of the integer division(n / d), rounded towards zero.MPZMPZ. tdivqrAssign(MPZ r, MPZ d)Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards zero.MPZMPZ. tdivqrAssign(MPZ r, MPZ n, MPZ d)Set thisMPZandrto the quotient and remainder of the integer division(n / d), rounded towards zero.MPZMPZ. tdivr(MPZ d)Return anMPZwhose value is the remainder of the integer division(this / d), rounded towards zero.MPZMPZ. tdivr2Exp(long b)Return anMPZwhose value is the remainder of the integer division(this / 2b), rounded towards zero.MPZMPZ. tdivr2ExpAssign(long b)Set thisMPZto the remainder of the integer division(this / 2b), rounded toward zero.MPZMPZ. tdivr2ExpAssign(MPZ n, long b)Set thisMPZto the remainder of the integer division(n / 2b), rounded toward zero.MPZMPZ. tdivrAssign(MPZ d)Set thisMPZto the remainder of the integer division(this / d), rounded towards zero.MPZMPZ. tdivrAssign(MPZ n, MPZ d)Set thisMPZto the remainder of the integer division(n / d), rounded towards zero.MPZMPZ. uiSub(long op)Return anMPZwhose value is(op - this).MPZMPZ. uiSubAssign(long op)Set thisMPZto(op - this)MPZMPZ. uiSubAssign(long op1, MPZ op2)Set thisMPZto(op1 - op2).static MPZMPZ. urandomb(RandState s, long n)Return anMPZwhose value is an uniformly distributed random integer in the range0} to(2n - 1), inclusive.MPZMPZ. urandombAssign(RandState s, long n)Set thisMPZto a uniformly distributed random integer in the range0to(2n - 1), inclusive.static MPZMPZ. urandomm(RandState s, MPZ n)Return anMPZwhose value is an uniformly distributed random integer in the range0to(n - 1), inclusive.MPZMPZ. urandommAssign(RandState s, MPZ n)Set thisMPZto a uniformly distributed random integer in the range0to(n - 1), inclusive.MPZMPZ. xor(MPZ op)Return anMPZwhose value is(this ^ op).MPZMPZ. xorAssign(MPZ op)Set thisMPZto(this ^ op).MPZMPZ. xorAssign(MPZ op1, MPZ op2)Set thisMPZto(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 ofMPZs 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 ofMPZs 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 twoMPZs 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 twoMPZs 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 twoMPZwhose values are then-th and(n-1)-th Fibonacci numbers.static org.javatuples.Pair<MPZ,MPZ>MPZ. fib2Ui(long n)Return twoMPZwhose values are then-th and(n-1)-th Fibonacci numbers.org.javatuples.Triplet<MPZ,MPZ,MPZ>MPZ. gcdext(MPZ op)Return the greatest common divisor ofthisandop, together with numberssandtsatisfying(a*this + b*op = g)See the GMP functionmpz_gcdext.org.javatuples.Triplet<MPZ,MPZ,MPZ>MPZ. gcdext(MPZ op)Return the greatest common divisor ofthisandop, together with numberssandtsatisfying(a*this + b*op = g)See the GMP functionmpz_gcdext.org.javatuples.Triplet<MPZ,MPZ,MPZ>MPZ. gcdext(MPZ op)Return the greatest common divisor ofthisandop, together with numberssandtsatisfying(a*this + b*op = g)See the GMP functionmpz_gcdext.static org.javatuples.Pair<java.lang.Integer,MPZ>MPZ. initSet(java.lang.String str, int base)Return anMPZwhose value is the number represented by the stringstrin the specifiedbase.java.util.Optional<MPZ>MPZ. invert(MPZ op)Optionally return, when it exists, anMPZwhose value is the inverse ofthismoduloop.static org.javatuples.Pair<MPZ,MPZ>MPZ. lucnum2Ui(long n)Return twoMPZwhose values are then-th and(n-1)-th Lucas numbers.static org.javatuples.Pair<MPZ,MPZ>MPZ. lucnum2Ui(long n)Return twoMPZwhose values are then-th and(n-1)-th Lucas numbers.org.javatuples.Pair<java.lang.Long,MPZ>MPZ. remove(MPZ f)Return the result of removing the factorffromthis, together with the number of occurrences which were removed.org.javatuples.Pair<java.lang.Boolean,MPZ>MPZ. root(long n)Return anMPZwhose value is the truncated integer part of thenth root ofthis, and a boolean flag which is true when the result is exact.org.javatuples.Pair<MPZ,MPZ>MPZ. rootrem(long n)Return twoMPZs whose values are the truncated integer part of thenth root ofthisand the remainder, i.e.,(u - rootn).org.javatuples.Pair<MPZ,MPZ>MPZ. rootrem(long n)Return twoMPZs whose values are the truncated integer part of thenth root ofthisand the remainder, i.e.,(u - rootn).org.javatuples.Pair<MPZ,MPZ>MPZ. sqrtrem()Return twoMPZs whose values are the truncated integer part of the square root ofthisand the remainder, i.e.,(op - root2).org.javatuples.Pair<MPZ,MPZ>MPZ. sqrtrem()Return twoMPZs whose values are the truncated integer part of the square root ofthisand the remainder, i.e.,(op - root2).org.javatuples.Pair<MPZ,MPZ>MPZ. tdivqr(MPZ d)Return twoMPZs 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 twoMPZs 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 MPZMPZ. absAssign(MPZ op)Set thisMPZto the absolute value ofop.MPZMPZ. add(MPZ op)Return anMPZwhose value is(this + op).MPZMPZ. addAssign(MPZ op)Set thisMPZto(this + op)MPZMPZ. addAssign(MPZ op1, MPZ op2)Set thisMPZto(op1 + op2).MPZMPZ. addmul(MPZ op1, MPZ op2)Return anMPZwhose value is(this + op1 * op2).MPZMPZ. addmulAssign(MPZ op1, MPZ op2)Add(op1 * op2)to thisMPZ.MPZMPZ. addmulUi(MPZ op1, long op2)Return anMPZwhose value is(this + op1 * op2).MPZMPZ. addmulUiAssign(MPZ op1, long op2)Add(op1 * op2)to thisMPZ.MPZMPZ. addUiAssign(MPZ op1, long op2)Set thisMPZto(op1 + op2).MPZMPZ. and(MPZ op)Return anMPZwhose value is(this & op).MPZMPZ. andAssign(MPZ op)Set thisMPZto(this & op).MPZMPZ. andAssign(MPZ op1, MPZ op2)Set thisMPZto(op1 & op2).MPZMPZ. binUiAssign(MPZ n, long k)Set thisMPZto the binomial coefficientnoverk.MPZMPZ. cdivq(MPZ d)Return anMPZwhose value is the quotient of the integer division(this / d), rounded towards +∞.MPZMPZ. cdivq2ExpAssign(MPZ n, long b)Set thisMPZto the quotient of the integer division(n / 2b), rounded toward +∞.MPZMPZ. cdivqAssign(MPZ d)Set thisMPZto the quotient of the integer division(this / d), rounded towards +∞.MPZMPZ. cdivqAssign(MPZ n, MPZ d)Set thisMPZto the quotient of the integer division(n / d), rounded towards +∞.org.javatuples.Pair<MPZ,MPZ>MPZ. cdivqr(MPZ d)Return a pair ofMPZs whose values are the quotient and remainder of the integer division(this / d), rounded towards +∞.MPZMPZ. cdivqrAssign(MPZ r, MPZ d)Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards +∞.MPZMPZ. cdivqrAssign(MPZ r, MPZ n, MPZ d)Set thisMPZandrto the quotient and remainder of the integer division(n / d), rounded towards +∞.longMPZ. cdivqrUiAssign(MPZ r, long d)Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards +∞; it also returns the remainder.longMPZ. cdivqrUiAssign(MPZ r, MPZ n, long d)Set thisMPZandrto the quotient and remainder of the integer division(n / d), rounded towards +∞; it also returns the remainder.longMPZ. cdivqUiAssign(MPZ n, long d)Set thisMPZto the quotient of the integer division(n / d), rounded towards +∞; it also Return the remainder.MPZMPZ. cdivr(MPZ d)Return anMPZwhose value is the remainder of the integer division(this / d), rounded towards +∞.MPZMPZ. cdivr2ExpAssign(MPZ n, long b)Set thisMPZto the remainder of the integer division(n / 2b), rounded toward +∞.MPZMPZ. cdivrAssign(MPZ d)Set thisMPZto the remainder of the integer division(this / d), rounded towards +∞.MPZMPZ. cdivrAssign(MPZ n, MPZ d)Set thisMPZto the remainder of the integer division(n / d), rounded towards +∞.longMPZ. cdivrUiAssign(MPZ n, long d)Set thisMPZto the remainder of the integer division(n / d), rounded towards +∞; it also returns the remainder.intMPF. cmp(MPZ op)Comparethiswithop.intMPQ. cmp(MPZ op)Comparethiswithop.intMPZ. cmp(MPZ op)Comparethiswithop.intMPZ. cmpabs(MPZ op)Compare the absolute values ofthisandop.MPZMPZ. comAssign(MPZ op)Set thisMPZto(~ op).intMPZ. compareTo(MPZ op)Compare thisMPZwithop.MPZMPZ. divexact(MPZ d)Return anMPZwhose value is the quotient of(this / d).MPZMPZ. divexactAssign(MPZ d)Set thisMPZto the quotient of(this / d).MPZMPZ. divexactAssign(MPZ n, MPZ d)Set thisMPZto the quotient of(n / d).MPZMPZ. divexactUiAssign(MPZ n, long d)Set thisMPZto the quotient of(n / d).MPZMPZ. fdivq(MPZ d)Return anMPZwhose value is the quotient of the integer division(this / d), rounded towards -∞.MPZMPZ. fdivq2ExpAssign(MPZ n, long b)Set thisMPZto the quotient of the integer division(n / 2b), rounded toward -∞.MPZMPZ. fdivqAssign(MPZ d)Set thisMPZto the quotient of the integer division(this / d), rounded towards -∞.MPZMPZ. fdivqAssign(MPZ n, MPZ d)Set thisMPZto the quotient of the integer division(n / d), rounded towards -∞.org.javatuples.Pair<MPZ,MPZ>MPZ. fdivqr(MPZ d)Return twoMPZs whose values are the quotient and remainder of the integer division(this / d), rounded towards -∞.MPZMPZ. fdivqrAssign(MPZ r, MPZ d)Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards -∞.MPZMPZ. fdivqrAssign(MPZ r, MPZ n, MPZ d)Set thisMPZandrto the quotient and remainder of the integer division(n / d), rounded towards -∞.longMPZ. fdivqrUiAssign(MPZ r, long d)Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards -∞; it also returns the absolute value of the remainder.longMPZ. fdivqrUiAssign(MPZ r, MPZ n, long d)Set thisMPZandrto the quotient and remainder of the integer division(n / d), rounded towards -∞; it also returns the absolute value of the remainder.longMPZ. fdivqUiAssign(MPZ n, long d)Set thisMPZto the quotient of the integer division(n / d), rounded towards -∞; it also returns the absolute value of the remainder.MPZMPZ. fdivr(MPZ d)Return anMPZwhose value is the remainder of the integer division(this / d), rounded towards -∞.MPZMPZ. fdivr2ExpAssign(MPZ n, long b)Set thisMPZto the remainder of the integer division(n / 2b), rounded toward -∞.MPZMPZ. fdivrAssign(MPZ d)Set thisMPZto the remainder of the integer division(this / d), rounded towards -∞.MPZMPZ. fdivrAssign(MPZ n, MPZ d)Set thisMPZto the remainder of the integer division(n / d), rounded towards -∞.longMPZ. fdivrUiAssign(MPZ n, long d)Set thisMPZto the remainder of the integer division(n / d), rounded towards -∞; it also returns the absolute value of the remainder.MPZMPZ. fib2UiAssign(MPZ fnsub1, long n)Set the value ofthisandfnsub1to then-th and(n-1)-th Fibonacci numbers respecively.MPZMPZ. gcd(MPZ op)Return anMPZwhose value is the greatest commond divisor ofthisandop.MPZMPZ. gcdAssign(MPZ op)Set thisMPZto the greatest commond divisor ofthisandop.MPZMPZ. gcdAssign(MPZ op1, MPZ op2)Set thisMPZto the greatest commond divisor ofop1andop2.org.javatuples.Triplet<MPZ,MPZ,MPZ>MPZ. gcdext(MPZ op)Return the greatest common divisor ofthisandop, together with numberssandtsatisfying(a*this + b*op = g)See the GMP functionmpz_gcdext.MPZMPZ. gcdextAssign(MPZ s, MPZ t, MPZ op)Set thisMPZto the greatest common divisor ofthisandop, and in addition Setsandtto coefficients satisfying(this*s + op*t = gcd).MPZMPZ. gcdextAssign(MPZ s, MPZ t, MPZ a, MPZ b)Set thisMPZto the greatest common divisor ofaandb, and in addition Setsandtto coefficients satisfying(a*s + b*t = gcd).longMPZ. gcdUiAssign(MPZ op1, long op2)Set thisMPZto the greatest commond divisor ofop1andop2, and return it.longMPZ. hamdist(MPZ op)Ifthisandopare both>= 0or both< 0, return the Hamming distance between them, which is the number of bit positions wherethisandophave different bit values.static MPZMPZ. initSet(MPZ op)Return anMPZwhose value isop.java.util.Optional<MPZ>MPZ. invert(MPZ op)Optionally return, when it exists, anMPZwhose value is the inverse ofthismoduloop.booleanMPZ. invertAssign(MPZ op)Set thisMPZto the inverse ofthismoduloop.booleanMPZ. invertAssign(MPZ op1, MPZ op2)Set thisMPZto the inverse ofop1moduloop2.MPZMPZ. ior(MPZ op)Return anMPZwhose value is(this | op).MPZMPZ. iorAssign(MPZ op)Set thisMPZto(this | op).MPZMPZ. iorAssign(MPZ op1, MPZ op2)Set thisMPZto(op1 | op2).booleanMPZ. isCongruent(MPZ c, MPZ d)Returntrueif and only ifthisis congruent tocmodulod.booleanMPZ. isCongruent2Exp(MPZ c, long b)Returntrueif and only ifthisis congruent tocmodulo2b.booleanMPZ. isDivisible(MPZ d)Returntrueif and only ifthisis exactly divisible byd.intMPZ. jacobi(MPZ b)Return the Jacobi symbol(this / b).intMPZ. kronecker(MPZ b)Return the Jacobi symbol(this / n)with the Kronecker extension(this/2)=(2/this)whenthisis odd, or(this/2)=0whenthisis even.MPZMPZ. lcm(MPZ op)Return anMPZwhose value is the least common multiple ofthisandop.MPZMPZ. lcmAssign(MPZ op)Set thisMPZto the least common multiple ofthisandop.MPZMPZ. lcmAssign(MPZ op1, MPZ op2)Set thisMPZto the least common multiple ofop1andop2.MPZMPZ. lcmUiAssign(MPZ op1, long op2)Set thisMPZto the least common multiple ofop1andop2.intMPZ. legendre(MPZ p)Return the Legendre symbol(this / p).MPZMPZ. lucnum2UiAssign(MPZ fnsub1, long n)Set the value ofthisandfnsub1to then-th and(n-1)-th Lucas numbers respecively.MPZMPZ. mod(MPZ d)Return anMPZwhose value is(this mod d).MPZMPZ. modAssign(MPZ d)Set thisMPZto(this mod d).MPZMPZ. modAssign(MPZ n, MPZ d)Set thisMPZto(n mod d).longMPZ. modUiAssign(MPZ n, long d)Set thisMPZto(n mod d); it also returns the result.MPZMPZ. mul(MPZ op)Return anMPZwhose value is(this * op).MPZMPZ. mul2ExpAssign(MPZ op, long b)Set thisMPZto(op * 2b).MPZMPZ. mulAssign(MPZ op)Set thisMPZto(this * op)MPZMPZ. mulAssign(MPZ op1, long op2)Set thisMPZto(op1 * op2).MPZMPZ. mulAssign(MPZ op1, MPZ op2)Set thisMPZto(op1 * op2).MPZMPZ. mulUiAssign(MPZ op1, long op2)Set thisMPZto(op1 * op2).MPZMPZ. negAssign(MPZ op)Set thisMPZto(- op).MPZMPZ. nextprimeAssign(MPZ op)Set thisMPZto the next prime greater thenop.MPZMPZ. powm(MPZ exp, MPZ mod)Return anMPZwhose value is(thisexp)modulomod.MPZMPZ. powmAssign(MPZ exp, MPZ mod)Set thisMPZto(thisexp)modulomod.MPZMPZ. powmAssign(MPZ base, MPZ exp, MPZ mod)Set thisMPZto(baseexp)modulomod.MPZMPZ. powmSec(MPZ exp, MPZ mod)Return anMPZwhose value is(thisexp)modulomod.MPZMPZ. powmSecAssign(MPZ exp, MPZ mod)Set thisMPZto(thisexp)modulomod.MPZMPZ. powmSecAssign(MPZ base, MPZ exp, MPZ mod)Set thisMPZto(baseexp)modulomod.MPZMPZ. powmUi(long exp, MPZ mod)Return anMPZwhose value is(thisexp)modulomod.MPZMPZ. powmUiAssign(long exp, MPZ mod)Set thisMPZto(thisexp)modulomod.MPZMPZ. powmUiAssign(MPZ base, long exp, MPZ mod)Set thisMPZto(baseexp)modulomod.MPZMPZ. powUiAssign(MPZ base, long exp)Set thisMPZto(baseexp).static RandStateRandState. randinitLc2Exp(MPZ a, long c, long m2exp)Returns a random state for a linear congruential algorithm.RandStateRandState. randseed(MPZ seed)Sets an initial seed value into this.org.javatuples.Pair<java.lang.Long,MPZ>MPZ. remove(MPZ f)Return the result of removing the factorffromthis, together with the number of occurrences which were removed.longMPZ. removeAssign(MPZ f)Remove all occurrences of the factorffromthisMPZ.longMPZ. removeAssign(MPZ op, MPZ f)Remove all occurrences of the factorffromopand stores the result in thisMPZ.booleanMPZ. rootAssign(MPZ op, long n)Set thisMPZto the truncated integer part of thenth root ofop.MPZMPZ. rootremAssign(MPZ rem, long n)Set thisMPZto the truncated integer part of the itsnth root andremto the remainder, i.e.,(this - rootn).MPZMPZ. rootremAssign(MPZ rem, MPZ u, long n)Set thisMPZto the truncated integer part of thenth root ofuandremto the remainder, i.e.,(u - rootn).MPFMPF. set(MPZ op)Set thisMPFtoop, possibly truncated according to precision.MPQMPQ. set(MPZ op)Set thisMPQtoop.MPZMPZ. set(MPZ op)Set thisMPZtoop.MPQMPQ. setDen(MPZ den)Set the denominator ofthisto the valueden.MPQMPQ. setNum(MPZ num)Set the numerator ofthisto the valuenum.MPFMPF. setValue(MPZ op)Set thisMPFtoop, possibly truncated according to precision.MPZMPZ. setValue(MPZ op)Set thisMPZtoop.MPZMPZ. sqrtAssign(MPZ op)Set thisMPZto the truncated integer part of the square root ofop.MPZMPZ. sqrtremAssign(MPZ rem)Set thisMPZto the truncated integer part of its square root andremto the remainder, i.e.,(this - root2).MPZMPZ. sqrtremAssign(MPZ rem, MPZ op)Set thisMPZto the truncated integer part of the square root ofopandremto the remainder, i.e.,(op - root2).MPZMPZ. sub(MPZ op)Return anMPZwhose value is(this - op).MPZMPZ. subAssign(MPZ op)Set thisMPZto(this - op)MPZMPZ. subAssign(MPZ op1, MPZ op2)Set thisMPZto(op1 - op2).MPZMPZ. submul(MPZ op1, MPZ op2)Return anMPZwhose value is(this - op1 * op2).MPZMPZ. submulAssign(MPZ op1, MPZ op2)Subtract(op1 * op2)to thisMPZ.MPZMPZ. submulUi(MPZ op1, long op2)Return anMPZwhose value is(this - op1 * op2).MPZMPZ. submulUiAssign(MPZ op1, long op2)Subtract(op1 * op2)to thisMPZ.MPZMPZ. subUiAssign(MPZ op1, long op2)Set thisMPZto(op1 - op2).MPZMPZ. swap(MPZ op)Swap the value of thisMPZwith the value ofop.MPZMPZ. tdivq(MPZ d)Return anMPZwhose value is the quotient of the integer division(this / d), rounded towards zero.MPZMPZ. tdivq2ExpAssign(MPZ n, long b)Set thisMPZto the quotient of the integer division(n / 2b), rounded toward zero.MPZMPZ. tdivqAssign(MPZ d)Set thisMPZto the quotient of the integer division(this / d), rounded towards zero.MPZMPZ. tdivqAssign(MPZ n, MPZ d)Set thisMPZto the quotient of the integer division(n / d), rounded towards zero.org.javatuples.Pair<MPZ,MPZ>MPZ. tdivqr(MPZ d)Return twoMPZs whose values are the quotient and remainder of the integer division(this / d), rounded towards zero.MPZMPZ. tdivqrAssign(MPZ r, MPZ d)Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards zero.MPZMPZ. tdivqrAssign(MPZ r, MPZ n, MPZ d)Set thisMPZandrto the quotient and remainder of the integer division(n / d), rounded towards zero.longMPZ. tdivqrUiAssign(MPZ r, long d)Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards zero; it also returns the absolute value of the remainder.longMPZ. tdivqrUiAssign(MPZ r, MPZ n, long d)Set thisMPZandrto the quotient and remainder of the integer division(n / d), rounded towards zero; it also returns the absolute value of the remainder.longMPZ. tdivqUiAssign(MPZ n, long d)Set thisMPZto the quotient of the integer division(n / d), rounded towards zero; it also returns the absolute value of the remainder.MPZMPZ. tdivr(MPZ d)Return anMPZwhose value is the remainder of the integer division(this / d), rounded towards zero.MPZMPZ. tdivr2ExpAssign(MPZ n, long b)Set thisMPZto the remainder of the integer division(n / 2b), rounded toward zero.MPZMPZ. tdivrAssign(MPZ d)Set thisMPZto the remainder of the integer division(this / d), rounded towards zero.MPZMPZ. tdivrAssign(MPZ n, MPZ d)Set thisMPZto the remainder of the integer division(n / d), rounded towards zero.longMPZ. tdivrUiAssign(MPZ n, long d)Set thisMPZto the remainder of the integer division(n / d), rounded towards zero; it also returns the absolute value of the remainder.MPZMPZ. uiSubAssign(long op1, MPZ op2)Set thisMPZto(op1 - op2).static MPZMPZ. urandomm(RandState s, MPZ n)Return anMPZwhose value is an uniformly distributed random integer in the range0to(n - 1), inclusive.MPZMPZ. urandommAssign(RandState s, MPZ n)Set thisMPZto a uniformly distributed random integer in the range0to(n - 1), inclusive.MPZMPZ. xor(MPZ op)Return anMPZwhose value is(this ^ op).MPZMPZ. xorAssign(MPZ op)Set thisMPZto(this ^ op).MPZMPZ. xorAssign(MPZ op1, MPZ op2)Set thisMPZto(op1 ^ op2).Constructors in it.unich.jgmp with parameters of type MPZ Constructor Description MPF(MPZ op)Build anMPFwhose value isop, possibly truncated to the default precision.MPQ(MPZ op)Build anMPQwhose value isop.MPZ(MPZ op)Build anMPZwhose value isop.
-