Remainder of IdealInt.
Remainder of IdealInt. We use Euclidian division
with remainder,
i.e., the property
this == (this / that) * that + (this % that)
holds, and this % that >= 0 and
this % that < that.abs.
TODO: make this more efficient
Bit-wise and.
Multiplication of IdealInt
Multiplication of IdealInt
Addition of IdealInt
Addition of IdealInt
Subtraction of IdealInt
Subtraction of IdealInt
Division of IdealInt.
Division of IdealInt. We use Euclidian division with
remainder,
i.e., the property
this == (this / that) * that + (this % that)
holds, and this % that >= 0 and
this % that < that.abs.
TODO: make this more efficient
Returns a pair of two IdealInt containing
(this / that) and (this % that).
Returns a pair of two IdealInt containing
(this / that) and (this % that). We use Euclidian division with remainder,
i.e., the property this == (this / that) * that + (this % that)
holds, and this % that >= 0 and
this % that < that.abs.
Less-than of IdealInt
Less-than of IdealInt
Left-shift.
Left-shift. For positive shifts, this is equivalent to multiplication by
pow2(shift). Negative shifts are equivalent to right-shift
by the negated value.
Left-shift.
Left-shift. For positive shifts, this is equivalent to multiplication by
pow2(shift). Negative shifts are equivalent to right-shift
by the negated value.
Less-than-or-equals comparison of IdealInt
Less-than-or-equals comparison of IdealInt
Greater-than comparison of IdealInt
Greater-than comparison of IdealInt
Greater-than-or-equals comparison of IdealInt
Greater-than-or-equals comparison of IdealInt
Right-shift with sign extension.
Right-shift with sign extension. For positive shifts, this is equivalent
to division by pow2(shift). Negative shifts are equivalent to
left-shift by the negated value.
Right-shift with sign extension.
Right-shift with sign extension. For positive shifts, this is equivalent
to division by pow2(shift). Negative shifts are equivalent to
left-shift by the negated value.
Bit-wise xor.
Returns the absolute value of this IdealInt
Returns the absolute value of this IdealInt
Returns a pair of two IdealInt containing
(this / that) and (this % that).
Returns a pair of two IdealInt containing
(this / that) and (this % that).
This operation only guarantees
this == (this / that) * that + (this % that), and that the
absolute value of (this % that) is less than the absolute
value of that.
Converts this IdealInt to an BigInt.
Converts this IdealInt to an BigInt.
Compares this IdealInt with the specified IdealInt
Compares this IdealInt with the specified IdealInt
A total order on integers that first compares the absolute value and then the sign: 0 < 1 < -1 < 2 < -2 < 3 < -3 < ...
Return whether this divides that
Compares this IdealInt with the specified
IdealInt for equality.
Compares this IdealInt with the specified
IdealInt for equality.
Compares this IdealInt with the specified value for equality.
Compares this IdealInt with the specified value for equality.
Returns the greatest common divisor of abs(this) and abs(that)
For a positive number, determine the index of the highest bit that is set.
For a positive number, determine the index of the highest bit that is set.
For instance, IdealInt.ONE.getHighestSetBit == 0.
Returns the hash code for this IdealInt.
Returns the hash code for this IdealInt.
Converts this IdealInt to an int.
Converts this IdealInt to an int.
If the IdealInt is too big to fit in a char, only the
low-order 32 bits are returned. Note that this conversion can lose
information about the overall magnitude of the IdealInt
value as well as return a result with the opposite sign.
Bit-wise inversion of this IdealInt
Bit-wise inversion of this IdealInt
Return whether this is minimal (in the
compareAbs order) modulo that, i.e., if
that is zero or if
(this compareAbs (this + a*that)) <= 0 for all non-zero
a
Return whether this is minimal (in the
compareAbs order) modulo that, i.e., if
that is zero or if
(this compareAbs (this + a*that)) <= 0 for all non-zero
a
Returns true iff this IdealInt is -one
Returns true iff this IdealInt is -one
Returns true iff this IdealInt is one
Returns true iff this IdealInt is one
Function corresponding to BigInteger.isProbablePrime
Function corresponding to BigInteger.isProbablePrime
Returns true iff this IdealInt is one or -one
Returns true iff this IdealInt is one or -one
Returns true iff this IdealInt is zero
Returns true iff this IdealInt is zero
Returns the least common multiple of abs(this) and abs(that)
Converts this IdealInt to a long.
Converts this IdealInt to a long.
If the IdealInt is too big to fit in a char, only the
low-order 64 bits are returned. Note that this conversion can lose
information about the overall magnitude of the IdealInt
value as well as return a result with the opposite sign.
Returns the maximum of this and that
Returns the minimum of this and that
Reduce this by adding a multiple of that and
return the remainder.
Reduce this by adding a multiple of that and
return the remainder. In contrast to %,
reduction is done so that the remainder has the same sign as
this, unless the remainder is zero.
Returns a IdealInt whose value is (this raised
to the power of exp).
Returns a IdealInt whose value is (this raised
to the power of exp).
Returns a IdealInt whose value is (this raised
to the power of exp), modulo modulus.
Returns a IdealInt whose value is (this raised
to the power of exp), modulo modulus.
Reduce this by adding a multiple of that and
return the quotient and the remainder.
Reduce this by adding a multiple of that and
return the quotient and the remainder. In contrast to /%,
reduction is done so that the remainder becomes minimal in the order
compareAbs. The result has the properties
this == quot * that + rem and
(rem compareAbs (rem + a*that)) < 0 for all non-zero
a.
Shift left, filling up with ones.
Shift left, filling up with ones. This is equivalent to
((this + 1) << shift) - 1.
Shift left, filling up with ones.
Shift left, filling up with ones. This is equivalent to
((this + 1) << shift) - 1.
Returns the sign of this IdealInt, i.e.
Returns the sign of this IdealInt, i.e.
-1 if it is less than 0,
+1 if it is greater than 0
0 if it is equal to 0
For a non-negative number this, return the greatest
number s such that s*s <= this.
For a non-negative number this, return the greatest
number s such that s*s <= this.
Returns the decimal String representation of this
IdealInt.
Returns the decimal String representation of this
IdealInt.
Returns a IdealInt whose value is the negation of this
IdealInt
Returns a IdealInt whose value is the negation of this
IdealInt
Bit-wise or.
(Since version ) see corresponding Javadoc for more information.