Uses of Class
it.unich.jgmp.MPZ
Packages that use MPZ
-
Uses of MPZ in it.unich.jgmp
Classes in it.unich.jgmp that implement interfaces with type arguments of type MPZMethods in it.unich.jgmp that return MPZModifier and TypeMethodDescriptionMPZ.abs()Return anMPZwhose value is the absolute value ofthis.MPZ.absAssign()Set thisMPZto its absolute value.Set thisMPZto the absolute value ofop.Return anMPZwhose value is(this + op).Set thisMPZto(this + op)Set thisMPZto(op1 + op2).Return anMPZwhose value is(this + op1 * op2).MPZ.addmulAssign(MPZ op1, MPZ op2) Add(op1 * op2)to thisMPZ.Return anMPZwhose value is(this + op1 * op2).MPZ.addmulUiAssign(MPZ op1, long op2) Add(op1 * op2)to thisMPZ.MPZ.addUi(long op) Return anMPZwhose value is(this + op).MPZ.addUiAssign(long op) Set thisMPZto(this + op)MPZ.addUiAssign(MPZ op1, long op2) Set thisMPZto(op1 + op2).Return anMPZwhose value is(this & op).Set thisMPZto(this & op).Set thisMPZto(op1 & op2).MPZ.binUi(long k) Return anMPZwhose value is the binomial coefficientthisoverk.MPZ.binUiAssign(long k) Set thisMPZto the binomial coefficientthisoverk.MPZ.binUiAssign(MPZ n, long k) Set thisMPZto the binomial coefficientnoverk.static MPZMPZ.binUiUi(long n, long k) Return anMPZwhose value is the binomial coefficientnoverk.MPZ.binUiUiAssign(long n, long k) Set thisMPZto the binomial coefficientnoverk.static MPZMPZ.bufferImport(int order, int size, int endian, long nails, ByteBuffer op) Return anMPZwhose value is determined from the buffer of word data atop.MPZ.bufferImportAssign(int order, int size, int endian, long nails, ByteBuffer op) Set thisMPZfrom the buffer of word data atop.Return anMPZwhose value is the quotient of the integer division(this / d), rounded towards +∞.MPZ.cdivq2Exp(long b) Return anMPZwhose value is the quotient of the integer division(this / 2b), rounded towards +∞.MPZ.cdivq2ExpAssign(long b) Set thisMPZto the quotient of the integer division(this / 2b), rounded toward +∞.MPZ.cdivq2ExpAssign(MPZ n, long b) Set thisMPZto the quotient of the integer division(n / 2b), rounded toward +∞.MPZ.cdivqAssign(MPZ d) Set thisMPZto the quotient of the integer division(this / d), rounded towards +∞.MPZ.cdivqAssign(MPZ n, MPZ d) Set thisMPZto the quotient of the integer division(n / d), rounded towards +∞.MPZ.cdivqrAssign(MPZ r, MPZ d) Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards +∞.MPZ.cdivqrAssign(MPZ r, MPZ n, MPZ d) Set thisMPZandrto the quotient and remainder of the integer division(n / d), rounded towards +∞.Return anMPZwhose value is the remainder of the integer division(this / d), rounded towards +∞.MPZ.cdivr2Exp(long b) Return anMPZwhose value is the remainder of the integer division(this / 2b), rounded towards +∞.MPZ.cdivr2ExpAssign(long b) Set thisMPZto the remainder of the integer division(this / 2b), rounded toward +∞.MPZ.cdivr2ExpAssign(MPZ n, long b) Set thisMPZto the remainder of the integer division(n / 2b), rounded toward +∞.MPZ.cdivrAssign(MPZ d) Set thisMPZto the remainder of the integer division(this / d), rounded towards +∞.MPZ.cdivrAssign(MPZ n, MPZ d) Set thisMPZto the remainder of the integer division(n / d), rounded towards +∞.MPZ.clrbit(long index) Return anMPZwhose value is(this & ~ 2index).MPZ.clrbitAssign(long index) Clear the bitindexof thisMPZ.MPZ.com()Return anMPZwhose value is(~ op).MPZ.comAssign()Set thisMPZto(~ this).Set thisMPZto(~ op).MPZ.combit(long index) Return anMPZwhose value is(this ^ 2index).MPZ.combitAssign(long index) Complement the bitindexof thisMPZ.static MPZMPZ.dfacUi(long n) Return anMPZwhose value the double factorial ofn.MPZ.dfacUiAssign(long n) Set thisMPZto the double factorial ofn.Return anMPZwhose value is the quotient of(this / d).MPZ.divexactAssign(MPZ d) Set thisMPZto the quotient of(this / d).MPZ.divexactAssign(MPZ n, MPZ d) Set thisMPZto the quotient of(n / d).MPZ.divexactUi(long d) Return anMPZwhose value is the quotient of(this / d).MPZ.divexactUiAssign(long d) Set thisMPZto the quotient of(this / d).MPZ.divexactUiAssign(MPZ n, long d) Set thisMPZto the quotient of(n / d).static MPZMPZ.facUi(long n) Return anMPZwhose value is the factorial ofn.MPZ.facUiAssign(long n) Set thisMPZto the factorial ofn.Return anMPZwhose value is the quotient of the integer division(this / d), rounded towards -∞.MPZ.fdivq2Exp(long b) Return anMPZwhose value is the quotient of the integer division(this / 2b), rounded towards -∞.MPZ.fdivq2ExpAssign(long b) Set thisMPZto the quotient of the integer division(this / 2b), rounded toward -∞.MPZ.fdivq2ExpAssign(MPZ n, long b) Set thisMPZto the quotient of the integer division(n / 2b), rounded toward -∞.MPZ.fdivqAssign(MPZ d) Set thisMPZto the quotient of the integer division(this / d), rounded towards -∞.MPZ.fdivqAssign(MPZ n, MPZ d) Set thisMPZto the quotient of the integer division(n / d), rounded towards -∞.MPZ.fdivqrAssign(MPZ r, MPZ d) Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards -∞.MPZ.fdivqrAssign(MPZ r, MPZ n, MPZ d) Set thisMPZandrto the quotient and remainder of the integer division(n / d), rounded towards -∞.Return anMPZwhose value is the remainder of the integer division(this / d), rounded towards -∞.MPZ.fdivr2Exp(long b) Return anMPZwhose value is the remainder of the integer division(this / 2b), rounded towards -∞.MPZ.fdivr2ExpAssign(long b) Set thisMPZto the remainder of the integer division(this / 2b), rounded toward -∞.MPZ.fdivr2ExpAssign(MPZ n, long b) Set thisMPZto the remainder of the integer division(n / 2b), rounded toward -∞.MPZ.fdivrAssign(MPZ d) Set thisMPZto the remainder of the integer division(this / d), rounded towards -∞.MPZ.fdivrAssign(MPZ n, MPZ d) Set thisMPZto the remainder of the integer division(n / d), rounded towards -∞.MPZ.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.MPZ.fibUiAssign(long n) Set thisMPZto then-th Fibonacci number.Return anMPZwhose value is the greatest commond divisor ofthisandop.Set thisMPZto the greatest commond divisor ofthisandop.Set thisMPZto the greatest commond divisor ofop1andop2.MPZ.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).MPZ.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).MPQ.getDen()Return the denominator ofthis.MPQ.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 MPZReturn anMPZwhose value isop.static MPZMPZ.initSetUi(long op) Return anMPZwhose value isop.Return anMPZwhose value is(this | op).Set thisMPZto(this | op).Set thisMPZto(op1 | op2).Return anMPZwhose value is the least common multiple ofthisandop.Set thisMPZto the least common multiple ofthisandop.Set thisMPZto the least common multiple ofop1andop2.MPZ.lcmUi(long op) Return the least common multiple ofthisandop.MPZ.lcmUiAssign(long op) Set thisMPZto the least common multiple ofthisandop.MPZ.lcmUiAssign(MPZ op1, long op2) Set thisMPZto the least common multiple ofop1andop2.MPZ.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.MPZ.lucnumUiAssign(long n) Set thisMPZto then-th Lucas number.static MPZMPZ.mfacUiUi(long n, long m) Return anMPZwhose value is them-multi factorial ofn.MPZ.mfacUiUiAssign(long n, long m) Set thisMPZto them-multi factorial ofn.Return anMPZwhose value is(this mod d).Set thisMPZto(this mod d).Set thisMPZto(n mod d).MPZ.mul(long op) Return anMPZwhose value is(this * op).Return anMPZwhose value is(this * op).MPZ.mul2Exp(long b) Return anMPZwhose value is(this * 2b).MPZ.mul2ExpAssign(long b) Set thisMPZto(this * 2b).MPZ.mul2ExpAssign(MPZ op, long b) Set thisMPZto(op * 2b).MPZ.mulAssign(long op) Set thisMPZto(this * op)Set thisMPZto(this * op)Set thisMPZto(op1 * op2).Set thisMPZto(op1 * op2).MPZ.mulUi(long op) Return anMPZwhose value is(this * op).MPZ.mulUiAssign(long op) Set thisMPZto(this * op)MPZ.mulUiAssign(MPZ op1, long op2) Set thisMPZto(op1 * op2).MPZ.neg()Return anMPZwhose value is the quotient of(- this).MPZ.negAssign()Set thisMPZto its opposite.Set thisMPZto(- op).MPZ.nextprime()Return anMPZwhose value is the next prime greater thenthis.MPZ.nextprimeAssign()Set thisMPZto the next prime greater then itself.MPZ.nextprimeAssign(MPZ op) Set thisMPZto the next prime greater thenop.Return anMPZwhose value is(thisexp)modulomod.MPZ.powmAssign(MPZ exp, MPZ mod) Set thisMPZto(thisexp)modulomod.MPZ.powmAssign(MPZ base, MPZ exp, MPZ mod) Set thisMPZto(baseexp)modulomod.Return anMPZwhose value is(thisexp)modulomod.MPZ.powmSecAssign(MPZ exp, MPZ mod) Set thisMPZto(thisexp)modulomod.MPZ.powmSecAssign(MPZ base, MPZ exp, MPZ mod) Set thisMPZto(baseexp)modulomod.Return anMPZwhose value is(thisexp)modulomod.MPZ.powmUiAssign(long exp, MPZ mod) Set thisMPZto(thisexp)modulomod.MPZ.powmUiAssign(MPZ base, long exp, MPZ mod) Set thisMPZto(baseexp)modulomod.MPZ.powUi(long exp) Return anMPZwhose value is(thisexp).static MPZMPZ.powUi(long base, long exp) Return anMPZwhose value is(baseexp).MPZ.powUiAssign(long exp) Set thisMPZto(thisexp).MPZ.powUiAssign(long base, long exp) Set thisMPZto(baseexp).MPZ.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.MPZ.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.static MPZMPZ.random2(long max_size) Deprecated.useMPZ.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.useMPZ.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.useMPZ.urandombAssign(it.unich.jgmp.RandState,long)orMPZ.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 tonbits.MPZ.rootremAssign(MPZ rem, long n) Set thisMPZto the truncated integer part of the itsnth root andremto the remainder, i.e.,(this - rootn).MPZ.rootremAssign(MPZ rem, MPZ u, long n) Set thisMPZto the truncated integer part of thenth root ofuandremto the remainder, i.e.,(u - rootn).static MPZReturn anMPZwhose value is a random integer with long strings of zeros and ones in the binary representation.MPZ.rrandombAssign(RandState s, long n) Set thisMPZto a random integer with long strings of zeros and ones in the binary representation.MPZ.set(double op) Set thisMPZto the truncation ofop.MPZ.set(long op) Set thisMPZtoop.Set thisMPZto the truncation ofop.Set thisMPZto the truncation ofop.Set thisMPZtoop.MPZ.set(BigInteger op) Sets thisMPZtoop.MPZ.setbit(long index) Return anMPZwhose value is(this | 2index).MPZ.setbitAssign(long index) Set the bitindexof thisMPZ.MPZ.setUi(long op) Set thisMPZtoop.MPZ.setValue(double op) Set thisMPZto the truncation opop.MPZ.setValue(long op) Set thisMPZto signed longop.Set thisMPZto the truncation opop.Set thisMPZto the truncation opop.Set thisMPZtoop.Set thisMPZto the value represented by the stringstrin decimal base.Set thisMPZto the number represented by the stringstrin the specifiedbase.MPZ.setValue(BigInteger op) Sets thisMPZtoop.MPZ.sqrt()Return anMPZwhose value is the truncated integer part of the square root ofthis.MPZ.sqrtAssign()Set thisMPZto the truncated integer part of its square root.MPZ.sqrtAssign(MPZ op) Set thisMPZto the truncated integer part of the square root ofop.MPZ.sqrtremAssign(MPZ rem) Set thisMPZto the truncated integer part of its square root andremto the remainder, i.e.,(this - root2).MPZ.sqrtremAssign(MPZ rem, MPZ op) Set thisMPZto the truncated integer part of the square root ofopandremto the remainder, i.e.,(op - root2).Return anMPZwhose value is(this - op).Set thisMPZto(this - op)Set thisMPZto(op1 - op2).Return anMPZwhose value is(this - op1 * op2).MPZ.submulAssign(MPZ op1, MPZ op2) Subtract(op1 * op2)to thisMPZ.Return anMPZwhose value is(this - op1 * op2).MPZ.submulUiAssign(MPZ op1, long op2) Subtract(op1 * op2)to thisMPZ.MPZ.subUi(long op) Return anMPZwhose value is(this - op).MPZ.subUiAssign(long op) Set thisMPZto(this - op)MPZ.subUiAssign(MPZ op1, long op2) Set thisMPZto(op1 - op2).Swap the value of thisMPZwith the value ofop.Return anMPZwhose value is the quotient of the integer division(this / d), rounded towards zero.MPZ.tdivq2Exp(long b) Return anMPZwhose value is the quotient of the integer division(this / 2b), rounded towards zero.MPZ.tdivq2ExpAssign(long b) Set thisMPZto the quotient of the integer division(this / 2b), rounded toward zero.MPZ.tdivq2ExpAssign(MPZ n, long b) Set thisMPZto the quotient of the integer division(n / 2b), rounded toward zero.MPZ.tdivqAssign(MPZ d) Set thisMPZto the quotient of the integer division(this / d), rounded towards zero.MPZ.tdivqAssign(MPZ n, MPZ d) Set thisMPZto the quotient of the integer division(n / d), rounded towards zero.MPZ.tdivqrAssign(MPZ r, MPZ d) Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards zero.MPZ.tdivqrAssign(MPZ r, MPZ n, MPZ d) Set thisMPZandrto the quotient and remainder of the integer division(n / d), rounded towards zero.Return anMPZwhose value is the remainder of the integer division(this / d), rounded towards zero.MPZ.tdivr2Exp(long b) Return anMPZwhose value is the remainder of the integer division(this / 2b), rounded towards zero.MPZ.tdivr2ExpAssign(long b) Set thisMPZto the remainder of the integer division(this / 2b), rounded toward zero.MPZ.tdivr2ExpAssign(MPZ n, long b) Set thisMPZto the remainder of the integer division(n / 2b), rounded toward zero.MPZ.tdivrAssign(MPZ d) Set thisMPZto the remainder of the integer division(this / d), rounded towards zero.MPZ.tdivrAssign(MPZ n, MPZ d) Set thisMPZto the remainder of the integer division(n / d), rounded towards zero.MPZ.uiSub(long op) Return anMPZwhose value is(op - this).MPZ.uiSubAssign(long op) Set thisMPZto(op - this)MPZ.uiSubAssign(long op1, MPZ op2) Set thisMPZto(op1 - op2).static MPZReturn anMPZwhose value is an uniformly distributed random integer in the range0} to(2n - 1), inclusive.MPZ.urandombAssign(RandState s, long n) Set thisMPZto a uniformly distributed random integer in the range0to(2n - 1), inclusive.static MPZReturn anMPZwhose value is an uniformly distributed random integer in the range0to(n - 1), inclusive.MPZ.urandommAssign(RandState s, MPZ n) Set thisMPZto a uniformly distributed random integer in the range0to(n - 1), inclusive.Return anMPZwhose value is(this ^ op).Set thisMPZto(this ^ op).Set thisMPZto(op1 ^ op2).Methods in it.unich.jgmp that return types with arguments of type MPZModifier and TypeMethodDescriptionReturn a pair ofMPZs whose values are the quotient and remainder of the integer division(this / d), rounded towards +∞.Return a pair ofMPZs whose values are the quotient and remainder of the integer division(this / d), rounded towards +∞.Return twoMPZs whose values are the quotient and remainder of the integer division(this / d), rounded towards -∞.Return twoMPZs whose values are the quotient and remainder of the integer division(this / d), rounded towards -∞.MPZ.fib2Ui(long n) Return twoMPZwhose values are then-th and(n-1)-th Fibonacci numbers.MPZ.fib2Ui(long n) Return twoMPZwhose values are then-th and(n-1)-th Fibonacci numbers.Return the greatest common divisor ofthisandop, together with numberssandtsatisfying(a*this + b*op = g)See the GMP functionmpz_gcdext.Return the greatest common divisor ofthisandop, together with numberssandtsatisfying(a*this + b*op = g)See the GMP functionmpz_gcdext.Return the greatest common divisor ofthisandop, together with numberssandtsatisfying(a*this + b*op = g)See the GMP functionmpz_gcdext.Return anMPZwhose value is the number represented by the stringstrin the specifiedbase.Optionally return, when it exists, anMPZwhose value is the inverse ofthismoduloop.MPZ.lucnum2Ui(long n) Return twoMPZwhose values are then-th and(n-1)-th Lucas numbers.MPZ.lucnum2Ui(long n) Return twoMPZwhose values are then-th and(n-1)-th Lucas numbers.Return the result of removing the factorffromthis, together with the number of occurrences which were removed.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.MPZ.rootrem(long n) Return twoMPZs whose values are the truncated integer part of thenth root ofthisand the remainder, i.e.,(u - rootn).MPZ.rootrem(long n) Return twoMPZs whose values are the truncated integer part of thenth root ofthisand the remainder, i.e.,(u - rootn).MPZ.sqrtrem()Return twoMPZs whose values are the truncated integer part of the square root ofthisand the remainder, i.e.,(op - root2).MPZ.sqrtrem()Return twoMPZs whose values are the truncated integer part of the square root ofthisand the remainder, i.e.,(op - root2).Return twoMPZs whose values are the quotient and remainder of the integer division(this / d), rounded towards zero.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 MPZModifier and TypeMethodDescriptionSet thisMPZto the absolute value ofop.Return anMPZwhose value is(this + op).Set thisMPZto(this + op)Set thisMPZto(op1 + op2).Return anMPZwhose value is(this + op1 * op2).MPZ.addmulAssign(MPZ op1, MPZ op2) Add(op1 * op2)to thisMPZ.Return anMPZwhose value is(this + op1 * op2).MPZ.addmulUiAssign(MPZ op1, long op2) Add(op1 * op2)to thisMPZ.MPZ.addUiAssign(MPZ op1, long op2) Set thisMPZto(op1 + op2).Return anMPZwhose value is(this & op).Set thisMPZto(this & op).Set thisMPZto(op1 & op2).MPZ.binUiAssign(MPZ n, long k) Set thisMPZto the binomial coefficientnoverk.Return anMPZwhose value is the quotient of the integer division(this / d), rounded towards +∞.MPZ.cdivq2ExpAssign(MPZ n, long b) Set thisMPZto the quotient of the integer division(n / 2b), rounded toward +∞.MPZ.cdivqAssign(MPZ d) Set thisMPZto the quotient of the integer division(this / d), rounded towards +∞.MPZ.cdivqAssign(MPZ n, MPZ d) Set thisMPZto the quotient of the integer division(n / d), rounded towards +∞.Return a pair ofMPZs whose values are the quotient and remainder of the integer division(this / d), rounded towards +∞.MPZ.cdivqrAssign(MPZ r, MPZ d) Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards +∞.MPZ.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.Return anMPZwhose value is the remainder of the integer division(this / d), rounded towards +∞.MPZ.cdivr2ExpAssign(MPZ n, long b) Set thisMPZto the remainder of the integer division(n / 2b), rounded toward +∞.MPZ.cdivrAssign(MPZ d) Set thisMPZto the remainder of the integer division(this / d), rounded towards +∞.MPZ.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.intComparethiswithop.intComparethiswithop.intComparethiswithop.intCompare the absolute values ofthisandop.Set thisMPZto(~ op).intCompare thisMPZwithop.Return anMPZwhose value is the quotient of(this / d).MPZ.divexactAssign(MPZ d) Set thisMPZto the quotient of(this / d).MPZ.divexactAssign(MPZ n, MPZ d) Set thisMPZto the quotient of(n / d).MPZ.divexactUiAssign(MPZ n, long d) Set thisMPZto the quotient of(n / d).Return anMPZwhose value is the quotient of the integer division(this / d), rounded towards -∞.MPZ.fdivq2ExpAssign(MPZ n, long b) Set thisMPZto the quotient of the integer division(n / 2b), rounded toward -∞.MPZ.fdivqAssign(MPZ d) Set thisMPZto the quotient of the integer division(this / d), rounded towards -∞.MPZ.fdivqAssign(MPZ n, MPZ d) Set thisMPZto the quotient of the integer division(n / d), rounded towards -∞.Return twoMPZs whose values are the quotient and remainder of the integer division(this / d), rounded towards -∞.MPZ.fdivqrAssign(MPZ r, MPZ d) Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards -∞.MPZ.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.Return anMPZwhose value is the remainder of the integer division(this / d), rounded towards -∞.MPZ.fdivr2ExpAssign(MPZ n, long b) Set thisMPZto the remainder of the integer division(n / 2b), rounded toward -∞.MPZ.fdivrAssign(MPZ d) Set thisMPZto the remainder of the integer division(this / d), rounded towards -∞.MPZ.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.MPZ.fib2UiAssign(MPZ fnsub1, long n) Set the value ofthisandfnsub1to then-th and(n-1)-th Fibonacci numbers respecively.Return anMPZwhose value is the greatest commond divisor ofthisandop.Set thisMPZto the greatest commond divisor ofthisandop.Set thisMPZto the greatest commond divisor ofop1andop2.Return the greatest common divisor ofthisandop, together with numberssandtsatisfying(a*this + b*op = g)See the GMP functionmpz_gcdext.MPZ.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).MPZ.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.longIfthisandopare both>= 0or both< 0, return the Hamming distance between them, which is the number of bit positions wherethisandophave different bit values.static MPZReturn anMPZwhose value isop.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.Return anMPZwhose value is(this | op).Set thisMPZto(this | op).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.intReturn the Jacobi symbol(this / b).intReturn the Jacobi symbol(this / n)with the Kronecker extension(this/2)=(2/this)whenthisis odd, or(this/2)=0whenthisis even.Return anMPZwhose value is the least common multiple ofthisandop.Set thisMPZto the least common multiple ofthisandop.Set thisMPZto the least common multiple ofop1andop2.MPZ.lcmUiAssign(MPZ op1, long op2) Set thisMPZto the least common multiple ofop1andop2.intReturn the Legendre symbol(this / p).MPZ.lucnum2UiAssign(MPZ fnsub1, long n) Set the value ofthisandfnsub1to then-th and(n-1)-th Lucas numbers respecively.Return anMPZwhose value is(this mod d).Set thisMPZto(this mod d).Set thisMPZto(n mod d).longMPZ.modUiAssign(MPZ n, long d) Set thisMPZto(n mod d); it also returns the result.Return anMPZwhose value is(this * op).MPZ.mul2ExpAssign(MPZ op, long b) Set thisMPZto(op * 2b).Set thisMPZto(this * op)Set thisMPZto(op1 * op2).Set thisMPZto(op1 * op2).MPZ.mulUiAssign(MPZ op1, long op2) Set thisMPZto(op1 * op2).Set thisMPZto(- op).MPZ.nextprimeAssign(MPZ op) Set thisMPZto the next prime greater thenop.Return anMPZwhose value is(thisexp)modulomod.MPZ.powmAssign(MPZ exp, MPZ mod) Set thisMPZto(thisexp)modulomod.MPZ.powmAssign(MPZ base, MPZ exp, MPZ mod) Set thisMPZto(baseexp)modulomod.Return anMPZwhose value is(thisexp)modulomod.MPZ.powmSecAssign(MPZ exp, MPZ mod) Set thisMPZto(thisexp)modulomod.MPZ.powmSecAssign(MPZ base, MPZ exp, MPZ mod) Set thisMPZto(baseexp)modulomod.Return anMPZwhose value is(thisexp)modulomod.MPZ.powmUiAssign(long exp, MPZ mod) Set thisMPZto(thisexp)modulomod.MPZ.powmUiAssign(MPZ base, long exp, MPZ mod) Set thisMPZto(baseexp)modulomod.MPZ.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.Sets an initial seed value into this.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.MPZ.rootremAssign(MPZ rem, long n) Set thisMPZto the truncated integer part of the itsnth root andremto the remainder, i.e.,(this - rootn).MPZ.rootremAssign(MPZ rem, MPZ u, long n) Set thisMPZto the truncated integer part of thenth root ofuandremto the remainder, i.e.,(u - rootn).Set thisMPFtoop, possibly truncated according to precision.Set thisMPQtoop.Set thisMPZtoop.Set the denominator ofthisto the valueden.Set the numerator ofthisto the valuenum.Set thisMPFtoop, possibly truncated according to precision.Set thisMPZtoop.MPZ.sqrtAssign(MPZ op) Set thisMPZto the truncated integer part of the square root ofop.MPZ.sqrtremAssign(MPZ rem) Set thisMPZto the truncated integer part of its square root andremto the remainder, i.e.,(this - root2).MPZ.sqrtremAssign(MPZ rem, MPZ op) Set thisMPZto the truncated integer part of the square root ofopandremto the remainder, i.e.,(op - root2).Return anMPZwhose value is(this - op).Set thisMPZto(this - op)Set thisMPZto(op1 - op2).Return anMPZwhose value is(this - op1 * op2).MPZ.submulAssign(MPZ op1, MPZ op2) Subtract(op1 * op2)to thisMPZ.Return anMPZwhose value is(this - op1 * op2).MPZ.submulUiAssign(MPZ op1, long op2) Subtract(op1 * op2)to thisMPZ.MPZ.subUiAssign(MPZ op1, long op2) Set thisMPZto(op1 - op2).Swap the value of thisMPZwith the value ofop.Return anMPZwhose value is the quotient of the integer division(this / d), rounded towards zero.MPZ.tdivq2ExpAssign(MPZ n, long b) Set thisMPZto the quotient of the integer division(n / 2b), rounded toward zero.MPZ.tdivqAssign(MPZ d) Set thisMPZto the quotient of the integer division(this / d), rounded towards zero.MPZ.tdivqAssign(MPZ n, MPZ d) Set thisMPZto the quotient of the integer division(n / d), rounded towards zero.Return twoMPZs whose values are the quotient and remainder of the integer division(this / d), rounded towards zero.MPZ.tdivqrAssign(MPZ r, MPZ d) Set thisMPZandrto the quotient and remainder of the integer division(this / d), rounded towards zero.MPZ.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.Return anMPZwhose value is the remainder of the integer division(this / d), rounded towards zero.MPZ.tdivr2ExpAssign(MPZ n, long b) Set thisMPZto the remainder of the integer division(n / 2b), rounded toward zero.MPZ.tdivrAssign(MPZ d) Set thisMPZto the remainder of the integer division(this / d), rounded towards zero.MPZ.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.MPZ.uiSubAssign(long op1, MPZ op2) Set thisMPZto(op1 - op2).static MPZReturn anMPZwhose value is an uniformly distributed random integer in the range0to(n - 1), inclusive.MPZ.urandommAssign(RandState s, MPZ n) Set thisMPZto a uniformly distributed random integer in the range0to(n - 1), inclusive.Return anMPZwhose value is(this ^ op).Set thisMPZto(this ^ op).Set thisMPZto(op1 ^ op2).Constructors in it.unich.jgmp with parameters of type MPZ
MPZ.urandomb(it.unich.jgmp.RandState,long)orMPZ.urandomm(it.unich.jgmp.RandState,it.unich.jgmp.MPZ)instead, since this method uses a global random state and it is not reentrant.