[−][src]Struct classygroup::Mpz
Fields
inner: mpz_t
Methods
impl Mpz
[src]
pub fn abs(&mut self, x: &Mpz)
[src]
pub fn abs_mut(&mut self)
[src]
pub fn add(&mut self, x: &Mpz, y: &Mpz)
[src]
pub fn add_mut(&mut self, x: &Mpz)
[src]
pub fn add_ui_mut(&mut self, x: u64)
[src]
pub fn sub_ui_mut(&mut self, x: u64)
[src]
pub fn sub_mul(&mut self, x: &Mpz, y: &Mpz)
[src]
pub fn cmp_mpz(&self, other: &Mpz) -> i32
[src]
pub fn cmpabs(&self, other: &Mpz) -> i32
[src]
pub fn cmp_si(&self, val: i64) -> i32
[src]
pub fn cdiv_q(&mut self, x: &Mpz, y: &Mpz)
[src]
pub fn cdiv_r(&mut self, x: &Mpz, y: &Mpz)
[src]
pub fn divexact(&mut self, n: &Mpz, d: &Mpz)
[src]
pub fn divexact_mut(&mut self, d: &Mpz)
[src]
pub fn fdiv_q(&mut self, x: &Mpz, y: &Mpz)
[src]
pub fn fdiv_q_mut(&mut self, x: &Mpz)
[src]
pub fn fdiv_r(&mut self, x: &Mpz, y: &Mpz)
[src]
pub fn fdiv_r_mut(&mut self, x: &Mpz)
[src]
pub fn fdiv_qr(&mut self, r: &mut Mpz, x: &Mpz, y: &Mpz)
[src]
pub fn fdiv_q_ui(&mut self, x: &Mpz, val: u64)
[src]
pub fn fdiv_q_ui_mut(&mut self, val: u64)
[src]
pub fn tdiv_q_mut(&mut self, x: &Mpz)
[src]
pub fn fits_slong_p(&self) -> i32
[src]
pub fn gcd(&mut self, x: &Mpz, y: &Mpz)
[src]
pub fn gcd_mut(&mut self, x: &Mpz)
[src]
pub fn gcdext(&mut self, d: &mut Mpz, e: &mut Mpz, a: &Mpz, m: &Mpz)
[src]
pub fn get_si(&self) -> i64
[src]
pub fn modulo(&mut self, x: &Mpz, y: &Mpz)
[src]
pub fn modulo_mut(&mut self, x: &Mpz)
[src]
pub fn mul(&mut self, x: &Mpz, y: &Mpz)
[src]
pub fn mul_mut(&mut self, x: &Mpz)
[src]
pub fn mul_ui(&mut self, x: &Mpz, val: u64)
[src]
pub fn mul_si(&mut self, x: &Mpz, val: i64)
[src]
pub fn mul_ui_mut(&mut self, val: u64)
[src]
pub fn neg(&mut self, x: &Mpz)
[src]
pub fn neg_mut(&mut self)
[src]
pub fn odd(&self) -> i32
[src]
pub fn root_mut(&mut self, x: u64) -> i32
[src]
pub fn set(&mut self, x: &Mpz)
[src]
pub fn set_cstr(&mut self, cs: &CString)
[src]
pub fn set_si(&mut self, val: i64)
[src]
pub fn set_ui(&mut self, val: u64)
[src]
pub fn sgn(&self) -> i32
[src]
pub fn square_mut(&mut self)
[src]
pub fn sub(&mut self, x: &Mpz, y: &Mpz)
[src]
pub fn submul(&mut self, x: &Mpz, y: &Mpz)
[src]
pub fn sub_mut(&mut self, x: &Mpz)
[src]
pub fn swap(&mut self, a: &mut Mpz)
[src]
pub fn tdiv_q_2exp(&mut self, op1: &Mpz, op2: u64)
[src]
pub fn bit_length(&self) -> usize
[src]
pub fn is_neg(&self) -> bool
[src]
pub fn size(&self) -> usize
[src]
pub fn getlimbn(&self, n: i64) -> limb_t
[src]
pub fn is_zero(&self) -> bool
[src]
pub fn is_one(&self) -> bool
[src]
pub fn div_floor(&mut self, numerator: &Mpz, denom: &Mpz)
[src]
pub fn add_mul(&mut self, x: &Mpz, y: &Mpz)
[src]
pub fn from_bytes(data: &[u8]) -> Self
[src]
pub fn to_u64(&self) -> Option<u64>
[src]
pub fn one() -> Mpz
[src]
pub fn zero() -> Mpz
[src]
pub fn probab_prime(&self, reps: i32) -> ProbabPrimeResult
[src]
Determine whether n is prime.
This function performs some trial divisions, then reps Miller-Rabin probabilistic primality tests. A higher reps value will reduce the chances of a non-prime being identified as “probably prime”. A composite number will be identified as a prime with a probability of less than 4^(-reps). Reasonable values of reps are between 15 and 50.
pub fn is_prime(&self, iterations: usize) -> bool
[src]
pub fn crem_u16(&self, modulus: u16) -> u16
[src]
Trait Implementations
impl Clone for Mpz
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Mpz
[src]
impl Default for Mpz
[src]
impl Eq for Mpz
[src]
impl From<u64> for Mpz
[src]
impl FromStr for Mpz
[src]
type Err = NulError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Hash for Mpz
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Mpz
[src]
fn cmp(&self, other: &Mpz) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Mpz> for Mpz
[src]
impl PartialOrd<Mpz> for Mpz
[src]
fn partial_cmp(&self, other: &Mpz) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Send for Mpz
[src]
impl Sync for Mpz
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> Cast<U> for T where
U: FromCast<T>,
U: FromCast<T>,
fn cast(self) -> U
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> FromBits<T> for T
fn from_bits(t: T) -> T
impl<T> FromCast<T> for T
fn from_cast(t: T) -> T
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> IntoBits<U> for T where
U: FromBits<T>,
U: FromBits<T>,
fn into_bits(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,