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 MPZ
MPZ. abs()
Return anMPZ
whose value is the absolute value ofthis
.MPZ
MPZ. absAssign()
Set thisMPZ
to its absolute value.MPZ
MPZ. absAssign(MPZ op)
Set thisMPZ
to the absolute value ofop
.MPZ
MPZ. add(MPZ op)
Return anMPZ
whose value is(this + op)
.MPZ
MPZ. addAssign(MPZ op)
Set thisMPZ
to(this + op)
MPZ
MPZ. addAssign(MPZ op1, MPZ op2)
Set thisMPZ
to(op1 + op2)
.MPZ
MPZ. addmul(MPZ op1, MPZ op2)
Return anMPZ
whose value is(this + op1 * op2)
.MPZ
MPZ. addmulAssign(MPZ op1, MPZ op2)
Add(op1 * op2)
to thisMPZ
.MPZ
MPZ. addmulUi(MPZ op1, long op2)
Return anMPZ
whose value is(this + op1 * op2)
.MPZ
MPZ. addmulUiAssign(MPZ op1, long op2)
Add(op1 * op2)
to thisMPZ
.MPZ
MPZ. addUi(long op)
Return anMPZ
whose value is(this + op)
.MPZ
MPZ. addUiAssign(long op)
Set thisMPZ
to(this + op)
MPZ
MPZ. addUiAssign(MPZ op1, long op2)
Set thisMPZ
to(op1 + op2)
.MPZ
MPZ. and(MPZ op)
Return anMPZ
whose value is(this & op)
.MPZ
MPZ. andAssign(MPZ op)
Set thisMPZ
to(this & op)
.MPZ
MPZ. andAssign(MPZ op1, MPZ op2)
Set thisMPZ
to(op1 & op2)
.MPZ
MPZ. binUi(long k)
Return anMPZ
whose value is the binomial coefficientthis
overk
.MPZ
MPZ. binUiAssign(long k)
Set thisMPZ
to the binomial coefficientthis
overk
.MPZ
MPZ. binUiAssign(MPZ n, long k)
Set thisMPZ
to the binomial coefficientn
overk
.static MPZ
MPZ. binUiUi(long n, long k)
Return anMPZ
whose value is the binomial coefficientn
overk
.MPZ
MPZ. binUiUiAssign(long n, long k)
Set thisMPZ
to the binomial coefficientn
overk
.static MPZ
MPZ. bufferImport(int order, int size, int endian, long nails, java.nio.ByteBuffer op)
Return anMPZ
whose value is determined from the buffer of word data atop
.MPZ
MPZ. bufferImportAssign(int order, int size, int endian, long nails, java.nio.ByteBuffer op)
Set thisMPZ
from the buffer of word data atop
.MPZ
MPZ. cdivq(MPZ d)
Return anMPZ
whose value is the quotient of the integer division(this / d)
, rounded towards +∞.MPZ
MPZ. cdivq2Exp(long b)
Return anMPZ
whose value is the quotient of the integer division(this / 2b)
, rounded towards +∞.MPZ
MPZ. cdivq2ExpAssign(long b)
Set thisMPZ
to the quotient of the integer division(this / 2b)
, rounded toward +∞.MPZ
MPZ. cdivq2ExpAssign(MPZ n, long b)
Set thisMPZ
to the quotient of the integer division(n / 2b)
, rounded toward +∞.MPZ
MPZ. cdivqAssign(MPZ d)
Set thisMPZ
to the quotient of the integer division(this / d)
, rounded towards +∞.MPZ
MPZ. cdivqAssign(MPZ n, MPZ d)
Set thisMPZ
to the quotient of the integer division(n / d)
, rounded towards +∞.MPZ
MPZ. cdivqrAssign(MPZ r, MPZ d)
Set thisMPZ
andr
to the quotient and remainder of the integer division(this / d)
, rounded towards +∞.MPZ
MPZ. cdivqrAssign(MPZ r, MPZ n, MPZ d)
Set thisMPZ
andr
to the quotient and remainder of the integer division(n / d)
, rounded towards +∞.MPZ
MPZ. cdivr(MPZ d)
Return anMPZ
whose value is the remainder of the integer division(this / d)
, rounded towards +∞.MPZ
MPZ. cdivr2Exp(long b)
Return anMPZ
whose value is the remainder of the integer division(this / 2b)
, rounded towards +∞.MPZ
MPZ. cdivr2ExpAssign(long b)
Set thisMPZ
to the remainder of the integer division(this / 2b)
, rounded toward +∞.MPZ
MPZ. cdivr2ExpAssign(MPZ n, long b)
Set thisMPZ
to the remainder of the integer division(n / 2b)
, rounded toward +∞.MPZ
MPZ. cdivrAssign(MPZ d)
Set thisMPZ
to the remainder of the integer division(this / d)
, rounded towards +∞.MPZ
MPZ. cdivrAssign(MPZ n, MPZ d)
Set thisMPZ
to the remainder of the integer division(n / d)
, rounded towards +∞.MPZ
MPZ. clrbit(long index)
Return anMPZ
whose value is(this & ~ 2index)
.MPZ
MPZ. clrbitAssign(long index)
Clear the bitindex
of thisMPZ
.MPZ
MPZ. com()
Return anMPZ
whose value is(~ op)
.MPZ
MPZ. comAssign()
Set thisMPZ
to(~ this)
.MPZ
MPZ. comAssign(MPZ op)
Set thisMPZ
to(~ op)
.MPZ
MPZ. combit(long index)
Return anMPZ
whose value is(this ^ 2index)
.MPZ
MPZ. combitAssign(long index)
Complement the bitindex
of thisMPZ
.static MPZ
MPZ. dfacUi(long n)
Return anMPZ
whose value the double factorial ofn
.MPZ
MPZ. dfacUiAssign(long n)
Set thisMPZ
to the double factorial ofn
.MPZ
MPZ. divexact(MPZ d)
Return anMPZ
whose value is the quotient of(this / d)
.MPZ
MPZ. divexactAssign(MPZ d)
Set thisMPZ
to the quotient of(this / d)
.MPZ
MPZ. divexactAssign(MPZ n, MPZ d)
Set thisMPZ
to the quotient of(n / d)
.MPZ
MPZ. divexactUi(long d)
Return anMPZ
whose value is the quotient of(this / d)
.MPZ
MPZ. divexactUiAssign(long d)
Set thisMPZ
to the quotient of(this / d)
.MPZ
MPZ. divexactUiAssign(MPZ n, long d)
Set thisMPZ
to the quotient of(n / d)
.static MPZ
MPZ. facUi(long n)
Return anMPZ
whose value is the factorial ofn
.MPZ
MPZ. facUiAssign(long n)
Set thisMPZ
to the factorial ofn
.MPZ
MPZ. fdivq(MPZ d)
Return anMPZ
whose value is the quotient of the integer division(this / d)
, rounded towards -∞.MPZ
MPZ. fdivq2Exp(long b)
Return anMPZ
whose value is the quotient of the integer division(this / 2b)
, rounded towards -∞.MPZ
MPZ. fdivq2ExpAssign(long b)
Set thisMPZ
to the quotient of the integer division(this / 2b)
, rounded toward -∞.MPZ
MPZ. fdivq2ExpAssign(MPZ n, long b)
Set thisMPZ
to the quotient of the integer division(n / 2b)
, rounded toward -∞.MPZ
MPZ. fdivqAssign(MPZ d)
Set thisMPZ
to the quotient of the integer division(this / d)
, rounded towards -∞.MPZ
MPZ. fdivqAssign(MPZ n, MPZ d)
Set thisMPZ
to the quotient of the integer division(n / d)
, rounded towards -∞.MPZ
MPZ. fdivqrAssign(MPZ r, MPZ d)
Set thisMPZ
andr
to the quotient and remainder of the integer division(this / d)
, rounded towards -∞.MPZ
MPZ. fdivqrAssign(MPZ r, MPZ n, MPZ d)
Set thisMPZ
andr
to the quotient and remainder of the integer division(n / d)
, rounded towards -∞.MPZ
MPZ. fdivr(MPZ d)
Return anMPZ
whose value is the remainder of the integer division(this / d)
, rounded towards -∞.MPZ
MPZ. fdivr2Exp(long b)
Return anMPZ
whose value is the remainder of the integer division(this / 2b)
, rounded towards -∞.MPZ
MPZ. fdivr2ExpAssign(long b)
Set thisMPZ
to the remainder of the integer division(this / 2b)
, rounded toward -∞.MPZ
MPZ. fdivr2ExpAssign(MPZ n, long b)
Set thisMPZ
to the remainder of the integer division(n / 2b)
, rounded toward -∞.MPZ
MPZ. fdivrAssign(MPZ d)
Set thisMPZ
to the remainder of the integer division(this / d)
, rounded towards -∞.MPZ
MPZ. fdivrAssign(MPZ n, MPZ d)
Set thisMPZ
to the remainder of the integer division(n / d)
, rounded towards -∞.MPZ
MPZ. fib2UiAssign(MPZ fnsub1, long n)
Set the value ofthis
andfnsub1
to then
-th and(n-1)
-th Fibonacci numbers respecively.static MPZ
MPZ. fibUi(long n)
Return anMPZ
whose value is then
-th Fibonacci number.MPZ
MPZ. fibUiAssign(long n)
Set thisMPZ
to then
-th Fibonacci number.MPZ
MPZ. gcd(MPZ op)
Return anMPZ
whose value is the greatest commond divisor ofthis
andop
.MPZ
MPZ. gcdAssign(MPZ op)
Set thisMPZ
to the greatest commond divisor ofthis
andop
.MPZ
MPZ. gcdAssign(MPZ op1, MPZ op2)
Set thisMPZ
to the greatest commond divisor ofop1
andop2
.MPZ
MPZ. gcdextAssign(MPZ s, MPZ t, MPZ op)
Set thisMPZ
to the greatest common divisor ofthis
andop
, and in addition Sets
andt
to coefficients satisfying(this*s + op*t = gcd)
.MPZ
MPZ. gcdextAssign(MPZ s, MPZ t, MPZ a, MPZ b)
Set thisMPZ
to the greatest common divisor ofa
andb
, and in addition Sets
andt
to coefficients satisfying(a*s + b*t = gcd)
.MPZ
MPQ. getDen()
Return the denominator ofthis
.MPZ
MPQ. getNum()
Return the numerator ofthis
.static MPZ
MPZ. init()
Return anMPZ
whose value is zero.static MPZ
MPZ. init2(long n)
Return anMPZ
whose value is zero, with pre-allocated space forn
-bit numbers.static MPZ
MPZ. initSet(double op)
Return anMPZ
whose value is the truncation ofop
.static MPZ
MPZ. initSet(long op)
Return anMPZ
whose value isop
.static MPZ
MPZ. initSet(MPZ op)
Return anMPZ
whose value isop
.static MPZ
MPZ. initSetUi(long op)
Return anMPZ
whose value isop
.MPZ
MPZ. ior(MPZ op)
Return anMPZ
whose value is(this | op)
.MPZ
MPZ. iorAssign(MPZ op)
Set thisMPZ
to(this | op)
.MPZ
MPZ. iorAssign(MPZ op1, MPZ op2)
Set thisMPZ
to(op1 | op2)
.MPZ
MPZ. lcm(MPZ op)
Return anMPZ
whose value is the least common multiple ofthis
andop
.MPZ
MPZ. lcmAssign(MPZ op)
Set thisMPZ
to the least common multiple ofthis
andop
.MPZ
MPZ. lcmAssign(MPZ op1, MPZ op2)
Set thisMPZ
to the least common multiple ofop1
andop2
.MPZ
MPZ. lcmUi(long op)
Return the least common multiple ofthis
andop
.MPZ
MPZ. lcmUiAssign(long op)
Set thisMPZ
to the least common multiple ofthis
andop
.MPZ
MPZ. lcmUiAssign(MPZ op1, long op2)
Set thisMPZ
to the least common multiple ofop1
andop2
.MPZ
MPZ. lucnum2UiAssign(MPZ fnsub1, long n)
Set the value ofthis
andfnsub1
to then
-th and(n-1)
-th Lucas numbers respecively.static MPZ
MPZ. lucnumUi(long n)
Return anMPZ
whose value is then
-th Lucas number.MPZ
MPZ. lucnumUiAssign(long n)
Set thisMPZ
to then
-th Lucas number.static MPZ
MPZ. mfacUiUi(long n, long m)
Return anMPZ
whose value is them
-multi factorial ofn
.MPZ
MPZ. mfacUiUiAssign(long n, long m)
Set thisMPZ
to them
-multi factorial ofn
.MPZ
MPZ. mod(MPZ d)
Return anMPZ
whose value is(this mod d)
.MPZ
MPZ. modAssign(MPZ d)
Set thisMPZ
to(this mod d)
.MPZ
MPZ. modAssign(MPZ n, MPZ d)
Set thisMPZ
to(n mod d)
.MPZ
MPZ. mul(long op)
Return anMPZ
whose value is(this * op)
.MPZ
MPZ. mul(MPZ op)
Return anMPZ
whose value is(this * op)
.MPZ
MPZ. mul2Exp(long b)
Return anMPZ
whose value is(this * 2b)
.MPZ
MPZ. mul2ExpAssign(long b)
Set thisMPZ
to(this * 2b)
.MPZ
MPZ. mul2ExpAssign(MPZ op, long b)
Set thisMPZ
to(op * 2b)
.MPZ
MPZ. mulAssign(long op)
Set thisMPZ
to(this * op)
MPZ
MPZ. mulAssign(MPZ op)
Set thisMPZ
to(this * op)
MPZ
MPZ. mulAssign(MPZ op1, long op2)
Set thisMPZ
to(op1 * op2)
.MPZ
MPZ. mulAssign(MPZ op1, MPZ op2)
Set thisMPZ
to(op1 * op2)
.MPZ
MPZ. mulUi(long op)
Return anMPZ
whose value is(this * op)
.MPZ
MPZ. mulUiAssign(long op)
Set thisMPZ
to(this * op)
MPZ
MPZ. mulUiAssign(MPZ op1, long op2)
Set thisMPZ
to(op1 * op2)
.MPZ
MPZ. neg()
Return anMPZ
whose value is the quotient of(- this)
.MPZ
MPZ. negAssign()
Set thisMPZ
to its opposite.MPZ
MPZ. negAssign(MPZ op)
Set thisMPZ
to(- op)
.MPZ
MPZ. nextprime()
Return anMPZ
whose value is the next prime greater thenthis
.MPZ
MPZ. nextprimeAssign()
Set thisMPZ
to the next prime greater then itself.MPZ
MPZ. nextprimeAssign(MPZ op)
Set thisMPZ
to the next prime greater thenop
.MPZ
MPZ. powm(MPZ exp, MPZ mod)
Return anMPZ
whose value is(thisexp)
modulomod
.MPZ
MPZ. powmAssign(MPZ exp, MPZ mod)
Set thisMPZ
to(thisexp)
modulomod
.MPZ
MPZ. powmAssign(MPZ base, MPZ exp, MPZ mod)
Set thisMPZ
to(baseexp)
modulomod
.MPZ
MPZ. powmSec(MPZ exp, MPZ mod)
Return anMPZ
whose value is(thisexp)
modulomod
.MPZ
MPZ. powmSecAssign(MPZ exp, MPZ mod)
Set thisMPZ
to(thisexp)
modulomod
.MPZ
MPZ. powmSecAssign(MPZ base, MPZ exp, MPZ mod)
Set thisMPZ
to(baseexp)
modulomod
.MPZ
MPZ. powmUi(long exp, MPZ mod)
Return anMPZ
whose value is(thisexp)
modulomod
.MPZ
MPZ. powmUiAssign(long exp, MPZ mod)
Set thisMPZ
to(thisexp)
modulomod
.MPZ
MPZ. powmUiAssign(MPZ base, long exp, MPZ mod)
Set thisMPZ
to(baseexp)
modulomod
.MPZ
MPZ. powUi(long exp)
Return anMPZ
whose value is(thisexp)
.static MPZ
MPZ. powUi(long base, long exp)
Return anMPZ
whose value is(baseexp)
.MPZ
MPZ. powUiAssign(long exp)
Set thisMPZ
to(thisexp)
.MPZ
MPZ. powUiAssign(long base, long exp)
Set thisMPZ
to(baseexp)
.MPZ
MPZ. powUiAssign(MPZ base, long exp)
Set thisMPZ
to(baseexp)
.static MPZ
MPZ. primorialUi(long n)
Return anMPZ
whose value is the primorial ofn
, i.e., the product of all positive prime numbers<= n
.MPZ
MPZ. primorialUiAssign(long n)
Set thisMPZ
to the primorial ofn
, i.e., the product of all positive prime numbers<= n
.static MPZ
MPZ. 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 MPZ
MPZ. 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.MPZ
MPZ. 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.MPZ
MPZ. 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.MPZ
MPZ. realloc2(long n)
Changes the space allocated for this number ton
bits.MPZ
MPZ. rootremAssign(MPZ rem, long n)
Set thisMPZ
to the truncated integer part of the itsn
th root andrem
to the remainder, i.e.,(this - rootn)
.MPZ
MPZ. rootremAssign(MPZ rem, MPZ u, long n)
Set thisMPZ
to the truncated integer part of then
th root ofu
andrem
to the remainder, i.e.,(u - rootn)
.static MPZ
MPZ. rrandomb(RandState s, long n)
Return anMPZ
whose value is a random integer with long strings of zeros and ones in the binary representation.MPZ
MPZ. rrandombAssign(RandState s, long n)
Set thisMPZ
to a random integer with long strings of zeros and ones in the binary representation.MPZ
MPZ. set(double op)
Set thisMPZ
to the truncation ofop
.MPZ
MPZ. set(long op)
Set thisMPZ
toop
.MPZ
MPZ. set(MPF op)
Set thisMPZ
to the truncation ofop
.MPZ
MPZ. set(MPQ op)
Set thisMPZ
to the truncation ofop
.MPZ
MPZ. set(MPZ op)
Set thisMPZ
toop
.MPZ
MPZ. set(java.math.BigInteger op)
Sets thisMPZ
toop
.MPZ
MPZ. setbit(long index)
Return anMPZ
whose value is(this | 2index)
.MPZ
MPZ. setbitAssign(long index)
Set the bitindex
of thisMPZ
.MPZ
MPZ. setUi(long op)
Set thisMPZ
toop
.MPZ
MPZ. setValue(double op)
Set thisMPZ
to the truncation opop
.MPZ
MPZ. setValue(long op)
Set thisMPZ
to signed longop
.MPZ
MPZ. setValue(MPF op)
Set thisMPZ
to the truncation opop
.MPZ
MPZ. setValue(MPQ op)
Set thisMPZ
to the truncation opop
.MPZ
MPZ. setValue(MPZ op)
Set thisMPZ
toop
.MPZ
MPZ. setValue(java.lang.String str)
Set thisMPZ
to the value represented by the stringstr
in decimal base.MPZ
MPZ. setValue(java.lang.String str, int base)
Set thisMPZ
to the number represented by the stringstr
in the specifiedbase
.MPZ
MPZ. setValue(java.math.BigInteger op)
Sets thisMPZ
toop
.MPZ
MPZ. sqrt()
Return anMPZ
whose value is the truncated integer part of the square root ofthis
.MPZ
MPZ. sqrtAssign()
Set thisMPZ
to the truncated integer part of its square root.MPZ
MPZ. sqrtAssign(MPZ op)
Set thisMPZ
to the truncated integer part of the square root ofop
.MPZ
MPZ. sqrtremAssign(MPZ rem)
Set thisMPZ
to the truncated integer part of its square root andrem
to the remainder, i.e.,(this - root2)
.MPZ
MPZ. sqrtremAssign(MPZ rem, MPZ op)
Set thisMPZ
to the truncated integer part of the square root ofop
andrem
to the remainder, i.e.,(op - root2)
.MPZ
MPZ. sub(MPZ op)
Return anMPZ
whose value is(this - op)
.MPZ
MPZ. subAssign(MPZ op)
Set thisMPZ
to(this - op)
MPZ
MPZ. subAssign(MPZ op1, MPZ op2)
Set thisMPZ
to(op1 - op2)
.MPZ
MPZ. submul(MPZ op1, MPZ op2)
Return anMPZ
whose value is(this - op1 * op2)
.MPZ
MPZ. submulAssign(MPZ op1, MPZ op2)
Subtract(op1 * op2)
to thisMPZ
.MPZ
MPZ. submulUi(MPZ op1, long op2)
Return anMPZ
whose value is(this - op1 * op2)
.MPZ
MPZ. submulUiAssign(MPZ op1, long op2)
Subtract(op1 * op2)
to thisMPZ
.MPZ
MPZ. subUi(long op)
Return anMPZ
whose value is(this - op)
.MPZ
MPZ. subUiAssign(long op)
Set thisMPZ
to(this - op)
MPZ
MPZ. subUiAssign(MPZ op1, long op2)
Set thisMPZ
to(op1 - op2)
.MPZ
MPZ. swap(MPZ op)
Swap the value of thisMPZ
with the value ofop
.MPZ
MPZ. tdivq(MPZ d)
Return anMPZ
whose value is the quotient of the integer division(this / d)
, rounded towards zero.MPZ
MPZ. tdivq2Exp(long b)
Return anMPZ
whose value is the quotient of the integer division(this / 2b)
, rounded towards zero.MPZ
MPZ. tdivq2ExpAssign(long b)
Set thisMPZ
to the quotient of the integer division(this / 2b)
, rounded toward zero.MPZ
MPZ. tdivq2ExpAssign(MPZ n, long b)
Set thisMPZ
to the quotient of the integer division(n / 2b)
, rounded toward zero.MPZ
MPZ. tdivqAssign(MPZ d)
Set thisMPZ
to the quotient of the integer division(this / d)
, rounded towards zero.MPZ
MPZ. tdivqAssign(MPZ n, MPZ d)
Set thisMPZ
to the quotient of the integer division(n / d)
, rounded towards zero.MPZ
MPZ. tdivqrAssign(MPZ r, MPZ d)
Set thisMPZ
andr
to the quotient and remainder of the integer division(this / d)
, rounded towards zero.MPZ
MPZ. tdivqrAssign(MPZ r, MPZ n, MPZ d)
Set thisMPZ
andr
to the quotient and remainder of the integer division(n / d)
, rounded towards zero.MPZ
MPZ. tdivr(MPZ d)
Return anMPZ
whose value is the remainder of the integer division(this / d)
, rounded towards zero.MPZ
MPZ. tdivr2Exp(long b)
Return anMPZ
whose value is the remainder of the integer division(this / 2b)
, rounded towards zero.MPZ
MPZ. tdivr2ExpAssign(long b)
Set thisMPZ
to the remainder of the integer division(this / 2b)
, rounded toward zero.MPZ
MPZ. tdivr2ExpAssign(MPZ n, long b)
Set thisMPZ
to the remainder of the integer division(n / 2b)
, rounded toward zero.MPZ
MPZ. tdivrAssign(MPZ d)
Set thisMPZ
to the remainder of the integer division(this / d)
, rounded towards zero.MPZ
MPZ. tdivrAssign(MPZ n, MPZ d)
Set thisMPZ
to the remainder of the integer division(n / d)
, rounded towards zero.MPZ
MPZ. uiSub(long op)
Return anMPZ
whose value is(op - this)
.MPZ
MPZ. uiSubAssign(long op)
Set thisMPZ
to(op - this)
MPZ
MPZ. uiSubAssign(long op1, MPZ op2)
Set thisMPZ
to(op1 - op2)
.static MPZ
MPZ. urandomb(RandState s, long n)
Return anMPZ
whose value is an uniformly distributed random integer in the range0
} to(2n - 1)
, inclusive.MPZ
MPZ. urandombAssign(RandState s, long n)
Set thisMPZ
to a uniformly distributed random integer in the range0
to(2n - 1)
, inclusive.static MPZ
MPZ. urandomm(RandState s, MPZ n)
Return anMPZ
whose value is an uniformly distributed random integer in the range0
to(n - 1)
, inclusive.MPZ
MPZ. urandommAssign(RandState s, MPZ n)
Set thisMPZ
to a uniformly distributed random integer in the range0
to(n - 1)
, inclusive.MPZ
MPZ. xor(MPZ op)
Return anMPZ
whose value is(this ^ op)
.MPZ
MPZ. xorAssign(MPZ op)
Set thisMPZ
to(this ^ op)
.MPZ
MPZ. xorAssign(MPZ op1, MPZ op2)
Set thisMPZ
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 ofMPZ
s 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 ofMPZ
s 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 twoMPZ
s 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 twoMPZ
s 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 twoMPZ
whose values are then
-th and(n-1)
-th Fibonacci numbers.static org.javatuples.Pair<MPZ,MPZ>
MPZ. fib2Ui(long n)
Return twoMPZ
whose 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 ofthis
andop
, together with numberss
andt
satisfying(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 ofthis
andop
, together with numberss
andt
satisfying(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 ofthis
andop
, together with numberss
andt
satisfying(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 anMPZ
whose value is the number represented by the stringstr
in the specifiedbase
.java.util.Optional<MPZ>
MPZ. invert(MPZ op)
Optionally return, when it exists, anMPZ
whose value is the inverse ofthis
moduloop
.static org.javatuples.Pair<MPZ,MPZ>
MPZ. lucnum2Ui(long n)
Return twoMPZ
whose values are then
-th and(n-1)
-th Lucas numbers.static org.javatuples.Pair<MPZ,MPZ>
MPZ. lucnum2Ui(long n)
Return twoMPZ
whose 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 factorf
fromthis
, together with the number of occurrences which were removed.org.javatuples.Pair<java.lang.Boolean,MPZ>
MPZ. root(long n)
Return anMPZ
whose value is the truncated integer part of then
th root ofthis
, and a boolean flag which is true when the result is exact.org.javatuples.Pair<MPZ,MPZ>
MPZ. rootrem(long n)
Return twoMPZ
s whose values are the truncated integer part of then
th root ofthis
and the remainder, i.e.,(u - rootn)
.org.javatuples.Pair<MPZ,MPZ>
MPZ. rootrem(long n)
Return twoMPZ
s whose values are the truncated integer part of then
th root ofthis
and the remainder, i.e.,(u - rootn)
.org.javatuples.Pair<MPZ,MPZ>
MPZ. sqrtrem()
Return twoMPZ
s whose values are the truncated integer part of the square root ofthis
and the remainder, i.e.,(op - root2)
.org.javatuples.Pair<MPZ,MPZ>
MPZ. sqrtrem()
Return twoMPZ
s whose values are the truncated integer part of the square root ofthis
and the remainder, i.e.,(op - root2)
.org.javatuples.Pair<MPZ,MPZ>
MPZ. tdivqr(MPZ d)
Return twoMPZ
s 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 twoMPZ
s 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
MPZ. absAssign(MPZ op)
Set thisMPZ
to the absolute value ofop
.MPZ
MPZ. add(MPZ op)
Return anMPZ
whose value is(this + op)
.MPZ
MPZ. addAssign(MPZ op)
Set thisMPZ
to(this + op)
MPZ
MPZ. addAssign(MPZ op1, MPZ op2)
Set thisMPZ
to(op1 + op2)
.MPZ
MPZ. addmul(MPZ op1, MPZ op2)
Return anMPZ
whose value is(this + op1 * op2)
.MPZ
MPZ. addmulAssign(MPZ op1, MPZ op2)
Add(op1 * op2)
to thisMPZ
.MPZ
MPZ. addmulUi(MPZ op1, long op2)
Return anMPZ
whose value is(this + op1 * op2)
.MPZ
MPZ. addmulUiAssign(MPZ op1, long op2)
Add(op1 * op2)
to thisMPZ
.MPZ
MPZ. addUiAssign(MPZ op1, long op2)
Set thisMPZ
to(op1 + op2)
.MPZ
MPZ. and(MPZ op)
Return anMPZ
whose value is(this & op)
.MPZ
MPZ. andAssign(MPZ op)
Set thisMPZ
to(this & op)
.MPZ
MPZ. andAssign(MPZ op1, MPZ op2)
Set thisMPZ
to(op1 & op2)
.MPZ
MPZ. binUiAssign(MPZ n, long k)
Set thisMPZ
to the binomial coefficientn
overk
.MPZ
MPZ. cdivq(MPZ d)
Return anMPZ
whose value is the quotient of the integer division(this / d)
, rounded towards +∞.MPZ
MPZ. cdivq2ExpAssign(MPZ n, long b)
Set thisMPZ
to the quotient of the integer division(n / 2b)
, rounded toward +∞.MPZ
MPZ. cdivqAssign(MPZ d)
Set thisMPZ
to the quotient of the integer division(this / d)
, rounded towards +∞.MPZ
MPZ. cdivqAssign(MPZ n, MPZ d)
Set thisMPZ
to the quotient of the integer division(n / d)
, rounded towards +∞.org.javatuples.Pair<MPZ,MPZ>
MPZ. cdivqr(MPZ d)
Return a pair ofMPZ
s whose values are the quotient and remainder of the integer division(this / d)
, rounded towards +∞.MPZ
MPZ. cdivqrAssign(MPZ r, MPZ d)
Set thisMPZ
andr
to the quotient and remainder of the integer division(this / d)
, rounded towards +∞.MPZ
MPZ. cdivqrAssign(MPZ r, MPZ n, MPZ d)
Set thisMPZ
andr
to the quotient and remainder of the integer division(n / d)
, rounded towards +∞.long
MPZ. cdivqrUiAssign(MPZ r, long d)
Set thisMPZ
andr
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 thisMPZ
andr
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 thisMPZ
to the quotient of the integer division(n / d)
, rounded towards +∞; it also Return the remainder.MPZ
MPZ. cdivr(MPZ d)
Return anMPZ
whose value is the remainder of the integer division(this / d)
, rounded towards +∞.MPZ
MPZ. cdivr2ExpAssign(MPZ n, long b)
Set thisMPZ
to the remainder of the integer division(n / 2b)
, rounded toward +∞.MPZ
MPZ. cdivrAssign(MPZ d)
Set thisMPZ
to the remainder of the integer division(this / d)
, rounded towards +∞.MPZ
MPZ. cdivrAssign(MPZ n, MPZ d)
Set thisMPZ
to the remainder of the integer division(n / d)
, rounded towards +∞.long
MPZ. cdivrUiAssign(MPZ n, long d)
Set thisMPZ
to the remainder of the integer division(n / d)
, rounded towards +∞; it also returns the remainder.int
MPF. cmp(MPZ op)
Comparethis
withop
.int
MPQ. cmp(MPZ op)
Comparethis
withop
.int
MPZ. cmp(MPZ op)
Comparethis
withop
.int
MPZ. cmpabs(MPZ op)
Compare the absolute values ofthis
andop
.MPZ
MPZ. comAssign(MPZ op)
Set thisMPZ
to(~ op)
.int
MPZ. compareTo(MPZ op)
Compare thisMPZ
withop
.MPZ
MPZ. divexact(MPZ d)
Return anMPZ
whose value is the quotient of(this / d)
.MPZ
MPZ. divexactAssign(MPZ d)
Set thisMPZ
to the quotient of(this / d)
.MPZ
MPZ. divexactAssign(MPZ n, MPZ d)
Set thisMPZ
to the quotient of(n / d)
.MPZ
MPZ. divexactUiAssign(MPZ n, long d)
Set thisMPZ
to the quotient of(n / d)
.MPZ
MPZ. fdivq(MPZ d)
Return anMPZ
whose value is the quotient of the integer division(this / d)
, rounded towards -∞.MPZ
MPZ. fdivq2ExpAssign(MPZ n, long b)
Set thisMPZ
to the quotient of the integer division(n / 2b)
, rounded toward -∞.MPZ
MPZ. fdivqAssign(MPZ d)
Set thisMPZ
to the quotient of the integer division(this / d)
, rounded towards -∞.MPZ
MPZ. fdivqAssign(MPZ n, MPZ d)
Set thisMPZ
to the quotient of the integer division(n / d)
, rounded towards -∞.org.javatuples.Pair<MPZ,MPZ>
MPZ. fdivqr(MPZ d)
Return twoMPZ
s whose values are the quotient and remainder of the integer division(this / d)
, rounded towards -∞.MPZ
MPZ. fdivqrAssign(MPZ r, MPZ d)
Set thisMPZ
andr
to the quotient and remainder of the integer division(this / d)
, rounded towards -∞.MPZ
MPZ. fdivqrAssign(MPZ r, MPZ n, MPZ d)
Set thisMPZ
andr
to the quotient and remainder of the integer division(n / d)
, rounded towards -∞.long
MPZ. fdivqrUiAssign(MPZ r, long d)
Set thisMPZ
andr
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 thisMPZ
andr
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 thisMPZ
to the quotient of the integer division(n / d)
, rounded towards -∞; it also returns the absolute value of the remainder.MPZ
MPZ. fdivr(MPZ d)
Return anMPZ
whose value is the remainder of the integer division(this / d)
, rounded towards -∞.MPZ
MPZ. fdivr2ExpAssign(MPZ n, long b)
Set thisMPZ
to the remainder of the integer division(n / 2b)
, rounded toward -∞.MPZ
MPZ. fdivrAssign(MPZ d)
Set thisMPZ
to the remainder of the integer division(this / d)
, rounded towards -∞.MPZ
MPZ. fdivrAssign(MPZ n, MPZ d)
Set thisMPZ
to the remainder of the integer division(n / d)
, rounded towards -∞.long
MPZ. fdivrUiAssign(MPZ n, long d)
Set thisMPZ
to the remainder of the integer division(n / d)
, rounded towards -∞; it also returns the absolute value of the remainder.MPZ
MPZ. fib2UiAssign(MPZ fnsub1, long n)
Set the value ofthis
andfnsub1
to then
-th and(n-1)
-th Fibonacci numbers respecively.MPZ
MPZ. gcd(MPZ op)
Return anMPZ
whose value is the greatest commond divisor ofthis
andop
.MPZ
MPZ. gcdAssign(MPZ op)
Set thisMPZ
to the greatest commond divisor ofthis
andop
.MPZ
MPZ. gcdAssign(MPZ op1, MPZ op2)
Set thisMPZ
to the greatest commond divisor ofop1
andop2
.org.javatuples.Triplet<MPZ,MPZ,MPZ>
MPZ. gcdext(MPZ op)
Return the greatest common divisor ofthis
andop
, together with numberss
andt
satisfying(a*this + b*op = g)
See the GMP functionmpz_gcdext
.MPZ
MPZ. gcdextAssign(MPZ s, MPZ t, MPZ op)
Set thisMPZ
to the greatest common divisor ofthis
andop
, and in addition Sets
andt
to coefficients satisfying(this*s + op*t = gcd)
.MPZ
MPZ. gcdextAssign(MPZ s, MPZ t, MPZ a, MPZ b)
Set thisMPZ
to the greatest common divisor ofa
andb
, and in addition Sets
andt
to coefficients satisfying(a*s + b*t = gcd)
.long
MPZ. gcdUiAssign(MPZ op1, long op2)
Set thisMPZ
to the greatest commond divisor ofop1
andop2
, and return it.long
MPZ. hamdist(MPZ op)
Ifthis
andop
are both>= 0
or both< 0
, return the Hamming distance between them, which is the number of bit positions wherethis
andop
have different bit values.static MPZ
MPZ. initSet(MPZ op)
Return anMPZ
whose value isop
.java.util.Optional<MPZ>
MPZ. invert(MPZ op)
Optionally return, when it exists, anMPZ
whose value is the inverse ofthis
moduloop
.boolean
MPZ. invertAssign(MPZ op)
Set thisMPZ
to the inverse ofthis
moduloop
.boolean
MPZ. invertAssign(MPZ op1, MPZ op2)
Set thisMPZ
to the inverse ofop1
moduloop2
.MPZ
MPZ. ior(MPZ op)
Return anMPZ
whose value is(this | op)
.MPZ
MPZ. iorAssign(MPZ op)
Set thisMPZ
to(this | op)
.MPZ
MPZ. iorAssign(MPZ op1, MPZ op2)
Set thisMPZ
to(op1 | op2)
.boolean
MPZ. isCongruent(MPZ c, MPZ d)
Returntrue
if and only ifthis
is congruent toc
modulod
.boolean
MPZ. isCongruent2Exp(MPZ c, long b)
Returntrue
if and only ifthis
is congruent toc
modulo2b
.boolean
MPZ. isDivisible(MPZ d)
Returntrue
if and only ifthis
is exactly divisible byd
.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)
whenthis
is odd, or(this/2)=0
whenthis
is even.MPZ
MPZ. lcm(MPZ op)
Return anMPZ
whose value is the least common multiple ofthis
andop
.MPZ
MPZ. lcmAssign(MPZ op)
Set thisMPZ
to the least common multiple ofthis
andop
.MPZ
MPZ. lcmAssign(MPZ op1, MPZ op2)
Set thisMPZ
to the least common multiple ofop1
andop2
.MPZ
MPZ. lcmUiAssign(MPZ op1, long op2)
Set thisMPZ
to the least common multiple ofop1
andop2
.int
MPZ. legendre(MPZ p)
Return the Legendre symbol(this / p)
.MPZ
MPZ. lucnum2UiAssign(MPZ fnsub1, long n)
Set the value ofthis
andfnsub1
to then
-th and(n-1)
-th Lucas numbers respecively.MPZ
MPZ. mod(MPZ d)
Return anMPZ
whose value is(this mod d)
.MPZ
MPZ. modAssign(MPZ d)
Set thisMPZ
to(this mod d)
.MPZ
MPZ. modAssign(MPZ n, MPZ d)
Set thisMPZ
to(n mod d)
.long
MPZ. modUiAssign(MPZ n, long d)
Set thisMPZ
to(n mod d)
; it also returns the result.MPZ
MPZ. mul(MPZ op)
Return anMPZ
whose value is(this * op)
.MPZ
MPZ. mul2ExpAssign(MPZ op, long b)
Set thisMPZ
to(op * 2b)
.MPZ
MPZ. mulAssign(MPZ op)
Set thisMPZ
to(this * op)
MPZ
MPZ. mulAssign(MPZ op1, long op2)
Set thisMPZ
to(op1 * op2)
.MPZ
MPZ. mulAssign(MPZ op1, MPZ op2)
Set thisMPZ
to(op1 * op2)
.MPZ
MPZ. mulUiAssign(MPZ op1, long op2)
Set thisMPZ
to(op1 * op2)
.MPZ
MPZ. negAssign(MPZ op)
Set thisMPZ
to(- op)
.MPZ
MPZ. nextprimeAssign(MPZ op)
Set thisMPZ
to the next prime greater thenop
.MPZ
MPZ. powm(MPZ exp, MPZ mod)
Return anMPZ
whose value is(thisexp)
modulomod
.MPZ
MPZ. powmAssign(MPZ exp, MPZ mod)
Set thisMPZ
to(thisexp)
modulomod
.MPZ
MPZ. powmAssign(MPZ base, MPZ exp, MPZ mod)
Set thisMPZ
to(baseexp)
modulomod
.MPZ
MPZ. powmSec(MPZ exp, MPZ mod)
Return anMPZ
whose value is(thisexp)
modulomod
.MPZ
MPZ. powmSecAssign(MPZ exp, MPZ mod)
Set thisMPZ
to(thisexp)
modulomod
.MPZ
MPZ. powmSecAssign(MPZ base, MPZ exp, MPZ mod)
Set thisMPZ
to(baseexp)
modulomod
.MPZ
MPZ. powmUi(long exp, MPZ mod)
Return anMPZ
whose value is(thisexp)
modulomod
.MPZ
MPZ. powmUiAssign(long exp, MPZ mod)
Set thisMPZ
to(thisexp)
modulomod
.MPZ
MPZ. powmUiAssign(MPZ base, long exp, MPZ mod)
Set thisMPZ
to(baseexp)
modulomod
.MPZ
MPZ. powUiAssign(MPZ base, long exp)
Set thisMPZ
to(baseexp)
.static RandState
RandState. randinitLc2Exp(MPZ a, long c, long m2exp)
Returns a random state for a linear congruential algorithm.RandState
RandState. 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 factorf
fromthis
, together with the number of occurrences which were removed.long
MPZ. removeAssign(MPZ f)
Remove all occurrences of the factorf
fromthis
MPZ.long
MPZ. removeAssign(MPZ op, MPZ f)
Remove all occurrences of the factorf
fromop
and stores the result in thisMPZ
.boolean
MPZ. rootAssign(MPZ op, long n)
Set thisMPZ
to the truncated integer part of then
th root ofop
.MPZ
MPZ. rootremAssign(MPZ rem, long n)
Set thisMPZ
to the truncated integer part of the itsn
th root andrem
to the remainder, i.e.,(this - rootn)
.MPZ
MPZ. rootremAssign(MPZ rem, MPZ u, long n)
Set thisMPZ
to the truncated integer part of then
th root ofu
andrem
to the remainder, i.e.,(u - rootn)
.MPF
MPF. set(MPZ op)
Set thisMPF
toop
, possibly truncated according to precision.MPQ
MPQ. set(MPZ op)
Set thisMPQ
toop
.MPZ
MPZ. set(MPZ op)
Set thisMPZ
toop
.MPQ
MPQ. setDen(MPZ den)
Set the denominator ofthis
to the valueden
.MPQ
MPQ. setNum(MPZ num)
Set the numerator ofthis
to the valuenum
.MPF
MPF. setValue(MPZ op)
Set thisMPF
toop
, possibly truncated according to precision.MPZ
MPZ. setValue(MPZ op)
Set thisMPZ
toop
.MPZ
MPZ. sqrtAssign(MPZ op)
Set thisMPZ
to the truncated integer part of the square root ofop
.MPZ
MPZ. sqrtremAssign(MPZ rem)
Set thisMPZ
to the truncated integer part of its square root andrem
to the remainder, i.e.,(this - root2)
.MPZ
MPZ. sqrtremAssign(MPZ rem, MPZ op)
Set thisMPZ
to the truncated integer part of the square root ofop
andrem
to the remainder, i.e.,(op - root2)
.MPZ
MPZ. sub(MPZ op)
Return anMPZ
whose value is(this - op)
.MPZ
MPZ. subAssign(MPZ op)
Set thisMPZ
to(this - op)
MPZ
MPZ. subAssign(MPZ op1, MPZ op2)
Set thisMPZ
to(op1 - op2)
.MPZ
MPZ. submul(MPZ op1, MPZ op2)
Return anMPZ
whose value is(this - op1 * op2)
.MPZ
MPZ. submulAssign(MPZ op1, MPZ op2)
Subtract(op1 * op2)
to thisMPZ
.MPZ
MPZ. submulUi(MPZ op1, long op2)
Return anMPZ
whose value is(this - op1 * op2)
.MPZ
MPZ. submulUiAssign(MPZ op1, long op2)
Subtract(op1 * op2)
to thisMPZ
.MPZ
MPZ. subUiAssign(MPZ op1, long op2)
Set thisMPZ
to(op1 - op2)
.MPZ
MPZ. swap(MPZ op)
Swap the value of thisMPZ
with the value ofop
.MPZ
MPZ. tdivq(MPZ d)
Return anMPZ
whose value is the quotient of the integer division(this / d)
, rounded towards zero.MPZ
MPZ. tdivq2ExpAssign(MPZ n, long b)
Set thisMPZ
to the quotient of the integer division(n / 2b)
, rounded toward zero.MPZ
MPZ. tdivqAssign(MPZ d)
Set thisMPZ
to the quotient of the integer division(this / d)
, rounded towards zero.MPZ
MPZ. tdivqAssign(MPZ n, MPZ d)
Set thisMPZ
to the quotient of the integer division(n / d)
, rounded towards zero.org.javatuples.Pair<MPZ,MPZ>
MPZ. tdivqr(MPZ d)
Return twoMPZ
s whose values are the quotient and remainder of the integer division(this / d)
, rounded towards zero.MPZ
MPZ. tdivqrAssign(MPZ r, MPZ d)
Set thisMPZ
andr
to the quotient and remainder of the integer division(this / d)
, rounded towards zero.MPZ
MPZ. tdivqrAssign(MPZ r, MPZ n, MPZ d)
Set thisMPZ
andr
to the quotient and remainder of the integer division(n / d)
, rounded towards zero.long
MPZ. tdivqrUiAssign(MPZ r, long d)
Set thisMPZ
andr
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 thisMPZ
andr
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 thisMPZ
to the quotient of the integer division(n / d)
, rounded towards zero; it also returns the absolute value of the remainder.MPZ
MPZ. tdivr(MPZ d)
Return anMPZ
whose value is the remainder of the integer division(this / d)
, rounded towards zero.MPZ
MPZ. tdivr2ExpAssign(MPZ n, long b)
Set thisMPZ
to the remainder of the integer division(n / 2b)
, rounded toward zero.MPZ
MPZ. tdivrAssign(MPZ d)
Set thisMPZ
to the remainder of the integer division(this / d)
, rounded towards zero.MPZ
MPZ. tdivrAssign(MPZ n, MPZ d)
Set thisMPZ
to the remainder of the integer division(n / d)
, rounded towards zero.long
MPZ. tdivrUiAssign(MPZ n, long d)
Set thisMPZ
to the remainder of the integer division(n / d)
, rounded towards zero; it also returns the absolute value of the remainder.MPZ
MPZ. uiSubAssign(long op1, MPZ op2)
Set thisMPZ
to(op1 - op2)
.static MPZ
MPZ. urandomm(RandState s, MPZ n)
Return anMPZ
whose value is an uniformly distributed random integer in the range0
to(n - 1)
, inclusive.MPZ
MPZ. urandommAssign(RandState s, MPZ n)
Set thisMPZ
to a uniformly distributed random integer in the range0
to(n - 1)
, inclusive.MPZ
MPZ. xor(MPZ op)
Return anMPZ
whose value is(this ^ op)
.MPZ
MPZ. xorAssign(MPZ op)
Set thisMPZ
to(this ^ op)
.MPZ
MPZ. xorAssign(MPZ op1, MPZ op2)
Set thisMPZ
to(op1 ^ op2)
.Constructors in it.unich.jgmp with parameters of type MPZ Constructor Description MPF(MPZ op)
Build anMPF
whose value isop
, possibly truncated to the default precision.MPQ(MPZ op)
Build anMPQ
whose value isop
.MPZ(MPZ op)
Build anMPZ
whose value isop
.
-