Struct Mpfr

Source
pub struct Mpfr {
    pub mpfr: mpfr_struct,
}

Fields§

§mpfr: mpfr_struct

Implementations§

Source§

impl Mpfr

Source

pub fn new() -> Mpfr

Source

pub fn new2(precision: usize) -> Mpfr

Source

pub fn new_from_str<T: Into<Vec<u8>>>(s: T, base: usize) -> Option<Mpfr>

Source

pub fn new2_from_str<T: Into<Vec<u8>>>( precision: usize, s: T, base: usize, ) -> Option<Mpfr>

Source

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

Source

pub fn new_u64_2exp(base: u64, exp: i32) -> Mpfr

Source

pub fn new_i64_2exp(base: i64, exp: i32) -> Mpfr

Source

pub fn new_mpz_2exp(base: &Mpz, exp: i32) -> Mpfr

Source

pub fn zero(sign: i32) -> Mpfr

Source

pub fn inf(sign: i32) -> Mpfr

Source

pub fn nan() -> Mpfr

Source

pub fn get_default_prec() -> usize

Source

pub fn set_default_prec(precision: usize)

Source

pub fn get_prec(&self) -> usize

Source

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

Source

pub fn floor(&self) -> Mpfr

Source

pub fn ceil(&self) -> Mpfr

Source

pub fn round(&self) -> Mpfr

Source

pub fn sqrt(&self) -> Mpfr

Source

pub fn cbrt(&self) -> Mpfr

Source

pub fn root(&self, k: u64) -> Mpfr

Source

pub fn pow(&self, other: &Mpfr) -> Mpfr

Source

pub fn abs(&self) -> Mpfr

Source

pub fn exp(&self) -> Mpfr

Source

pub fn log(&self) -> Mpfr

Source

pub fn gamma(&self) -> Mpfr

Source

pub fn lngamma(&self) -> Mpfr

Source

pub fn lgamma(&self) -> Mpfr

Trait Implementations§

Source§

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

Source§

type Output = Mpfr

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Mpfr

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a> Add<&'a Mpfr> for f64

Source§

type Output = Mpfr

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a Mpfr) -> Mpfr

Performs the + operation. Read more
Source§

impl<'a> Add<&'a Mpfr> for i64

Source§

type Output = Mpfr

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a Mpfr) -> Mpfr

Performs the + operation. Read more
Source§

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

Source§

type Output = Mpfr

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<Mpfr> for f64

Source§

type Output = Mpfr

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<Mpfr> for i64

Source§

type Output = Mpfr

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a> Add<f64> for &'a Mpfr

Source§

type Output = Mpfr

The resulting type after applying the + operator.
Source§

fn add(self, other: f64) -> Mpfr

Performs the + operation. Read more
Source§

impl Add<f64> for Mpfr

Source§

type Output = Mpfr

The resulting type after applying the + operator.
Source§

fn add(self, other: f64) -> Mpfr

Performs the + operation. Read more
Source§

impl<'a> Add<i64> for &'a Mpfr

Source§

type Output = Mpfr

The resulting type after applying the + operator.
Source§

fn add(self, other: i64) -> Mpfr

Performs the + operation. Read more
Source§

impl Add<i64> for Mpfr

Source§

type Output = Mpfr

The resulting type after applying the + operator.
Source§

fn add(self, other: i64) -> Mpfr

Performs the + operation. Read more
Source§

impl Add for Mpfr

Source§

type Output = Mpfr

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Clone for Mpfr

Source§

fn clone(&self) -> Mpfr

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 Debug for Mpfr

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Decodable for Mpfr

Source§

fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>

Deserialize a value using a Decoder.
Source§

impl Display for Mpfr

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

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

Source§

type Output = Mpfr

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

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

Source§

type Output = Mpfr

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Mpfr> for f64

Source§

type Output = Mpfr

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Mpfr) -> Mpfr

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Mpfr> for i64

Source§

type Output = Mpfr

The resulting type after applying the / operator.
Source§

fn div(self, other: &'a Mpfr) -> Mpfr

Performs the / operation. Read more
Source§

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

Source§

type Output = Mpfr

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<Mpfr> for f64

Source§

type Output = Mpfr

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<Mpfr> for i64

Source§

type Output = Mpfr

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<'a> Div<f64> for &'a Mpfr

Source§

type Output = Mpfr

The resulting type after applying the / operator.
Source§

fn div(self, other: f64) -> Mpfr

Performs the / operation. Read more
Source§

impl Div<f64> for Mpfr

Source§

type Output = Mpfr

The resulting type after applying the / operator.
Source§

fn div(self, other: f64) -> Mpfr

Performs the / operation. Read more
Source§

impl<'a> Div<i64> for &'a Mpfr

Source§

type Output = Mpfr

The resulting type after applying the / operator.
Source§

fn div(self, other: i64) -> Mpfr

Performs the / operation. Read more
Source§

impl Div<i64> for Mpfr

Source§

type Output = Mpfr

The resulting type after applying the / operator.
Source§

fn div(self, other: i64) -> Mpfr

Performs the / operation. Read more
Source§

impl Div for Mpfr

Source§

type Output = Mpfr

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Drop for Mpfr

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Encodable for Mpfr

Source§

fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>

Serialize a value using an Encoder.
Source§

impl From<Mpf> for Mpfr

Source§

fn from(x: Mpf) -> Mpfr

Converts to this type from the input type.
Source§

impl From<Mpq> for Mpfr

Source§

fn from(x: Mpq) -> Mpfr

Converts to this type from the input type.
Source§

impl From<Mpz> for Mpfr

Source§

fn from(x: Mpz) -> Mpfr

Converts to this type from the input type.
Source§

impl From<f64> for Mpfr

Source§

fn from(x: f64) -> Mpfr

Converts to this type from the input type.
Source§

impl From<i64> for Mpfr

Source§

fn from(x: i64) -> Mpfr

Converts to this type from the input type.
Source§

impl From<u64> for Mpfr

Source§

fn from(x: u64) -> Mpfr

Converts to this type from the input type.
Source§

impl<'a> Into<Mpf> for &'a Mpfr

Source§

fn into(self) -> Mpf

Converts this type into the (usually inferred) input type.
Source§

impl<'a> Into<Mpz> for &'a Mpfr

Source§

fn into(self) -> Mpz

Converts this type into the (usually inferred) input type.
Source§

impl<'a> Into<f64> for &'a Mpfr

Source§

fn into(self) -> f64

Converts this type into the (usually inferred) input type.
Source§

impl<'a> Into<i64> for &'a Mpfr

Source§

fn into(self) -> i64

Converts this type into the (usually inferred) input type.
Source§

impl<'a> Into<u64> for &'a Mpfr

Source§

fn into(self) -> u64

Converts this type into the (usually inferred) input type.
Source§

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

Source§

type Output = Mpfr

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = Mpfr

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Mpfr> for f64

Source§

type Output = Mpfr

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Mpfr) -> Mpfr

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Mpfr> for i64

Source§

type Output = Mpfr

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'a Mpfr) -> Mpfr

Performs the * operation. Read more
Source§

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

Source§

type Output = Mpfr

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Mpfr> for f64

Source§

type Output = Mpfr

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Mpfr> for i64

Source§

type Output = Mpfr

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<f64> for &'a Mpfr

Source§

type Output = Mpfr

The resulting type after applying the * operator.
Source§

fn mul(self, other: f64) -> Mpfr

Performs the * operation. Read more
Source§

impl Mul<f64> for Mpfr

Source§

type Output = Mpfr

The resulting type after applying the * operator.
Source§

fn mul(self, other: f64) -> Mpfr

Performs the * operation. Read more
Source§

impl<'a> Mul<i64> for &'a Mpfr

Source§

type Output = Mpfr

The resulting type after applying the * operator.
Source§

fn mul(self, other: i64) -> Mpfr

Performs the * operation. Read more
Source§

impl Mul<i64> for Mpfr

Source§

type Output = Mpfr

The resulting type after applying the * operator.
Source§

fn mul(self, other: i64) -> Mpfr

Performs the * operation. Read more
Source§

impl Mul for Mpfr

Source§

type Output = Mpfr

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'b> Neg for &'b Mpfr

Source§

type Output = Mpfr

The resulting type after applying the - operator.
Source§

fn neg(self) -> Mpfr

Performs the unary - operation. Read more
Source§

impl Neg for Mpfr

Source§

type Output = Mpfr

The resulting type after applying the - operator.
Source§

fn neg(self) -> Mpfr

Performs the unary - operation. Read more
Source§

impl Ord for Mpfr

Source§

fn cmp(&self, other: &Mpfr) -> 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 Mpfr

Source§

fn eq(&self, other: &Mpfr) -> 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 Mpfr

Source§

fn partial_cmp(&self, other: &Mpfr) -> 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 Mpfr> for &'b Mpfr

Source§

type Output = Mpfr

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Mpfr

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a Mpfr> for f64

Source§

type Output = Mpfr

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a Mpfr) -> Mpfr

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a Mpfr> for i64

Source§

type Output = Mpfr

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a Mpfr) -> Mpfr

Performs the - operation. Read more
Source§

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

Source§

type Output = Mpfr

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<Mpfr> for f64

Source§

type Output = Mpfr

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<Mpfr> for i64

Source§

type Output = Mpfr

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a> Sub<f64> for &'a Mpfr

Source§

type Output = Mpfr

The resulting type after applying the - operator.
Source§

fn sub(self, other: f64) -> Mpfr

Performs the - operation. Read more
Source§

impl Sub<f64> for Mpfr

Source§

type Output = Mpfr

The resulting type after applying the - operator.
Source§

fn sub(self, other: f64) -> Mpfr

Performs the - operation. Read more
Source§

impl<'a> Sub<i64> for &'a Mpfr

Source§

type Output = Mpfr

The resulting type after applying the - operator.
Source§

fn sub(self, other: i64) -> Mpfr

Performs the - operation. Read more
Source§

impl Sub<i64> for Mpfr

Source§

type Output = Mpfr

The resulting type after applying the - operator.
Source§

fn sub(self, other: i64) -> Mpfr

Performs the - operation. Read more
Source§

impl Sub for Mpfr

Source§

type Output = Mpfr

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Eq for Mpfr

Source§

impl Send for Mpfr

Auto Trait Implementations§

§

impl Freeze for Mpfr

§

impl RefUnwindSafe for Mpfr

§

impl !Sync for Mpfr

§

impl Unpin for Mpfr

§

impl UnwindSafe for Mpfr

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.