pub struct Mpq { /* private fields */ }Implementations§
Source§impl Mpq
impl Mpq
pub unsafe fn inner(&self) -> mpq_srcptr
pub unsafe fn inner_mut(&mut self) -> mpq_ptr
pub fn new() -> Mpq
pub fn ratio(num: &Mpz, den: &Mpz) -> Mpq
pub fn from_str_radix(s: &str, base: u8) -> Result<Mpq, ParseMpqError>
pub fn set(&mut self, other: &Mpq)
pub fn set_z(&mut self, other: &Mpz)
pub fn set_d(&mut self, other: f64)
pub fn set_f(&mut self, other: &Mpf)
pub fn get_num(&self) -> Mpz
pub fn get_den(&self) -> Mpz
pub fn abs(&self) -> Mpq
pub fn invert(&self) -> Mpq
pub fn floor(&self) -> Mpz
pub fn ceil(&self) -> Mpz
pub fn sign(&self) -> Sign
pub fn one() -> Mpq
pub fn zero() -> Mpq
pub fn is_zero(&self) -> bool
Trait Implementations§
Source§impl<'a> AddAssign<&'a Mpq> for Mpq
impl<'a> AddAssign<&'a Mpq> for Mpq
Source§fn add_assign(&mut self, other: &Mpq)
fn add_assign(&mut self, other: &Mpq)
Performs the
+= operation. Read moreSource§impl<'a> AddAssign for Mpq
impl<'a> AddAssign for Mpq
Source§fn add_assign(&mut self, other: Mpq)
fn add_assign(&mut self, other: Mpq)
Performs the
+= operation. Read moreSource§impl<'a> DivAssign<&'a Mpq> for Mpq
impl<'a> DivAssign<&'a Mpq> for Mpq
Source§fn div_assign(&mut self, other: &Mpq)
fn div_assign(&mut self, other: &Mpq)
Performs the
/= operation. Read moreSource§impl<'a> DivAssign for Mpq
impl<'a> DivAssign for Mpq
Source§fn div_assign(&mut self, other: Mpq)
fn div_assign(&mut self, other: Mpq)
Performs the
/= operation. Read moreSource§impl<'a> MulAssign<&'a Mpq> for Mpq
impl<'a> MulAssign<&'a Mpq> for Mpq
Source§fn mul_assign(&mut self, other: &Mpq)
fn mul_assign(&mut self, other: &Mpq)
Performs the
*= operation. Read moreSource§impl<'a> MulAssign for Mpq
impl<'a> MulAssign for Mpq
Source§fn mul_assign(&mut self, other: Mpq)
fn mul_assign(&mut self, other: Mpq)
Performs the
*= operation. Read moreSource§impl Ord for Mpq
impl Ord for Mpq
Source§impl PartialOrd for Mpq
impl PartialOrd for Mpq
Source§impl<'a> SubAssign<&'a Mpq> for Mpq
impl<'a> SubAssign<&'a Mpq> for Mpq
Source§fn sub_assign(&mut self, other: &Mpq)
fn sub_assign(&mut self, other: &Mpq)
Performs the
-= operation. Read moreSource§impl<'a> SubAssign for Mpq
impl<'a> SubAssign for Mpq
Source§fn sub_assign(&mut self, other: Mpq)
fn sub_assign(&mut self, other: Mpq)
Performs the
-= operation. Read moreimpl Eq for Mpq
impl Send for Mpq
impl Sync for Mpq
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more