Struct Mpf

Source
pub struct Mpf { /* private fields */ }

Implementations§

Source§

impl Mpf

Source

pub unsafe fn inner(&self) -> mpf_srcptr

Source

pub unsafe fn inner_mut(&mut self) -> mpf_ptr

Source

pub fn zero() -> Mpf

Source

pub fn new(precision: usize) -> Mpf

Source

pub fn set(&mut self, other: &Mpf)

Source

pub fn set_z(&mut self, other: &Mpz)

Source

pub fn set_q(&mut self, other: &Mpq)

Source

pub fn get_prec(&self) -> usize

Source

pub fn set_prec(&mut self, precision: usize)

Source

pub fn set_from_str(&mut self, string: &str, base: i32)

Source

pub fn set_from_si(&mut self, int: i64)

Source

pub fn get_str(&mut self, n_digits: i32, base: i32, exp: &mut c_long) -> String

Source

pub fn abs(&self) -> Mpf

Source

pub fn ceil(&self) -> Mpf

Source

pub fn floor(&self) -> Mpf

Source

pub fn trunc(&self) -> Mpf

Source

pub fn reldiff(&self, other: &Mpf) -> Mpf

Source

pub fn sqrt(self) -> Mpf

Source

pub fn sign(&self) -> Sign

Trait Implementations§

Source§

impl<'a, 'b> Add<&'a Mpf> for &'b Mpf

Source§

type Output = Mpf

The resulting type after applying the + operator.
Source§

fn add(self, other: &Mpf) -> Mpf

Performs the + operation. Read more
Source§

impl<'a> Add<&'a Mpf> for Mpf

Source§

type Output = Mpf

The resulting type after applying the + operator.
Source§

fn add(self, other: &Mpf) -> Mpf

Performs the + operation. Read more
Source§

impl<'a> Add<Mpf> for &'a Mpf

Source§

type Output = Mpf

The resulting type after applying the + operator.
Source§

fn add(self, other: Mpf) -> Mpf

Performs the + operation. Read more
Source§

impl Add for Mpf

Source§

type Output = Mpf

The resulting type after applying the + operator.
Source§

fn add(self, other: Mpf) -> Mpf

Performs the + operation. Read more
Source§

impl<'a> AddAssign<&'a Mpf> for Mpf

Source§

fn add_assign(&mut self, other: &Mpf)

Performs the += operation. Read more
Source§

impl<'a> AddAssign for Mpf

Source§

fn add_assign(&mut self, other: Mpf)

Performs the += operation. Read more
Source§

impl Clone for Mpf

Source§

fn clone(&self) -> Mpf

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, 'b> Div<&'a Mpf> for &'b Mpf

Source§

type Output = Mpf

The resulting type after applying the / operator.
Source§

fn div(self, other: &Mpf) -> Mpf

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Mpf> for Mpf

Source§

type Output = Mpf

The resulting type after applying the / operator.
Source§

fn div(self, other: &Mpf) -> Mpf

Performs the / operation. Read more
Source§

impl<'a> Div<Mpf> for &'a Mpf

Source§

type Output = Mpf

The resulting type after applying the / operator.
Source§

fn div(self, other: Mpf) -> Mpf

Performs the / operation. Read more
Source§

impl Div for Mpf

Source§

type Output = Mpf

The resulting type after applying the / operator.
Source§

fn div(self, other: Mpf) -> Mpf

Performs the / operation. Read more
Source§

impl<'a> DivAssign<&'a Mpf> for Mpf

Source§

fn div_assign(&mut self, other: &Mpf)

Performs the /= operation. Read more
Source§

impl<'a> DivAssign for Mpf

Source§

fn div_assign(&mut self, other: Mpf)

Performs the /= operation. Read more
Source§

impl Drop for Mpf

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'a, 'b> Mul<&'a Mpf> for &'b Mpf

Source§

type Output = Mpf

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Mpf) -> Mpf

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Mpf> for Mpf

Source§

type Output = Mpf

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Mpf) -> Mpf

Performs the * operation. Read more
Source§

impl<'a> Mul<Mpf> for &'a Mpf

Source§

type Output = Mpf

The resulting type after applying the * operator.
Source§

fn mul(self, other: Mpf) -> Mpf

Performs the * operation. Read more
Source§

impl Mul for Mpf

Source§

type Output = Mpf

The resulting type after applying the * operator.
Source§

fn mul(self, other: Mpf) -> Mpf

Performs the * operation. Read more
Source§

impl<'a> MulAssign<&'a Mpf> for Mpf

Source§

fn mul_assign(&mut self, other: &Mpf)

Performs the *= operation. Read more
Source§

impl<'a> MulAssign for Mpf

Source§

fn mul_assign(&mut self, other: Mpf)

Performs the *= operation. Read more
Source§

impl<'b> Neg for &'b Mpf

Source§

type Output = Mpf

The resulting type after applying the - operator.
Source§

fn neg(self) -> Mpf

Performs the unary - operation. Read more
Source§

impl Neg for Mpf

Source§

type Output = Mpf

The resulting type after applying the - operator.
Source§

fn neg(self) -> Mpf

Performs the unary - operation. Read more
Source§

impl One for Mpf

Source§

fn one() -> Mpf

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

fn is_one(&self) -> bool
where Self: PartialEq,

Returns true if self is equal to the multiplicative identity. Read more
Source§

impl Ord for Mpf

Source§

fn cmp(&self, other: &Mpf) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Mpf

Source§

fn eq(&self, other: &Mpf) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Mpf

Source§

fn partial_cmp(&self, other: &Mpf) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b> Sub<&'a Mpf> for &'b Mpf

Source§

type Output = Mpf

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Mpf) -> Mpf

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a Mpf> for Mpf

Source§

type Output = Mpf

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Mpf) -> Mpf

Performs the - operation. Read more
Source§

impl<'a> Sub<Mpf> for &'a Mpf

Source§

type Output = Mpf

The resulting type after applying the - operator.
Source§

fn sub(self, other: Mpf) -> Mpf

Performs the - operation. Read more
Source§

impl Sub for Mpf

Source§

type Output = Mpf

The resulting type after applying the - operator.
Source§

fn sub(self, other: Mpf) -> Mpf

Performs the - operation. Read more
Source§

impl<'a> SubAssign<&'a Mpf> for Mpf

Source§

fn sub_assign(&mut self, other: &Mpf)

Performs the -= operation. Read more
Source§

impl<'a> SubAssign for Mpf

Source§

fn sub_assign(&mut self, other: Mpf)

Performs the -= operation. Read more
Source§

impl Zero for Mpf

Source§

fn zero() -> Mpf

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl Eq for Mpf

Source§

impl Send for Mpf

Source§

impl Sync for Mpf

Auto Trait Implementations§

§

impl Freeze for Mpf

§

impl RefUnwindSafe for Mpf

§

impl Unpin for Mpf

§

impl UnwindSafe for Mpf

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.