[][src]Struct algebraics::algebraic_numbers::RealAlgebraicNumber

pub struct RealAlgebraicNumber { /* fields omitted */ }

Methods

impl RealAlgebraicNumber[src]

pub fn new_unchecked(
    minimal_polynomial: Polynomial<BigInt>,
    interval: DyadicFractionInterval
) -> Self
[src]

pub fn minimal_polynomial(&self) -> &Polynomial<BigInt>[src]

pub fn data(&self) -> &RealAlgebraicNumberData[src]

pub fn into_data(self) -> RealAlgebraicNumberData[src]

pub fn degree(&self) -> usize[src]

pub fn is_rational(&self) -> bool[src]

pub fn is_integer(&self) -> bool[src]

pub fn to_rational(&self) -> Option<Ratio<BigInt>>[src]

pub fn to_integer(&self) -> Option<BigInt>[src]

pub fn interval(&self) -> &DyadicFractionInterval[src]

pub fn into_integer_floor(self) -> BigInt[src]

pub fn to_integer_floor(&self) -> BigInt[src]

pub fn into_floor(self) -> Self[src]

pub fn floor(&self) -> Self[src]

pub fn into_fract(self) -> Self[src]

returns self - self.floor()

pub fn fract(&self) -> Self[src]

returns self - self.floor()

pub fn into_integer_ceil(self) -> BigInt[src]

pub fn to_integer_ceil(&self) -> BigInt[src]

pub fn into_ceil(self) -> Self[src]

pub fn ceil(&self) -> Self[src]

pub fn cmp_with_zero(&self) -> Ordering[src]

pub fn into_integer_trunc(self) -> BigInt[src]

pub fn to_integer_trunc(&self) -> BigInt[src]

pub fn into_trunc(self) -> Self[src]

pub fn trunc(&self) -> Self[src]

pub fn checked_recip(&self) -> Option<Self>[src]

pub fn recip(&self) -> Self[src]

pub fn negative_one() -> Self[src]

pub fn set_negative_one(&mut self)[src]

pub fn is_negative_one(&self) -> bool[src]

pub fn checked_into_pow<E: IntoRationalExponent>(
    self,
    exponent: E
) -> Option<Self>
[src]

pub fn checked_pow<E: IntoRationalExponent>(&self, exponent: E) -> Option<Self>[src]

pub fn to_integer_log2(&self) -> Option<i64>[src]

returns Some(log2(self)) if self is a power of 2, otherwise None

pub fn into_checked_floor_log2(self) -> Option<i64>[src]

returns Some(floor(log2(self))) if self is positive, otherwise None

pub fn checked_floor_log2(&self) -> Option<i64>[src]

returns Some(floor(log2(self))) if self is positive, otherwise None

pub fn into_checked_ceil_log2(self) -> Option<i64>[src]

returns Some(ceil(log2(self))) if self is positive, otherwise None

pub fn checked_ceil_log2(&self) -> Option<i64>[src]

returns Some(floor(log2(self))) if self is positive, otherwise None

Trait Implementations

impl ExactDiv<RealAlgebraicNumber> for RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

impl<'_> ExactDiv<&'_ RealAlgebraicNumber> for RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

impl<'_> ExactDiv<RealAlgebraicNumber> for &'_ RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

impl<'a, 'b> ExactDiv<&'a RealAlgebraicNumber> for &'b RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

impl ExactDivAssign<RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl<'_> ExactDivAssign<&'_ RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl AlwaysExactDiv<RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl<'_> AlwaysExactDiv<&'_ RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl<'_> AlwaysExactDiv<RealAlgebraicNumber> for &'_ RealAlgebraicNumber[src]

impl<'a, 'b> AlwaysExactDiv<&'a RealAlgebraicNumber> for &'b RealAlgebraicNumber[src]

impl AlwaysExactDivAssign<RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl<'_> AlwaysExactDivAssign<&'_ RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl From<u8> for RealAlgebraicNumber[src]

impl From<Ratio<u8>> for RealAlgebraicNumber[src]

impl From<u16> for RealAlgebraicNumber[src]

impl From<Ratio<u16>> for RealAlgebraicNumber[src]

impl From<u32> for RealAlgebraicNumber[src]

impl From<Ratio<u32>> for RealAlgebraicNumber[src]

impl From<u64> for RealAlgebraicNumber[src]

impl From<Ratio<u64>> for RealAlgebraicNumber[src]

impl From<u128> for RealAlgebraicNumber[src]

impl From<Ratio<u128>> for RealAlgebraicNumber[src]

impl From<usize> for RealAlgebraicNumber[src]

impl From<Ratio<usize>> for RealAlgebraicNumber[src]

impl From<BigUint> for RealAlgebraicNumber[src]

impl From<Ratio<BigUint>> for RealAlgebraicNumber[src]

impl From<i8> for RealAlgebraicNumber[src]

impl From<Ratio<i8>> for RealAlgebraicNumber[src]

impl From<i16> for RealAlgebraicNumber[src]

impl From<Ratio<i16>> for RealAlgebraicNumber[src]

impl From<i32> for RealAlgebraicNumber[src]

impl From<Ratio<i32>> for RealAlgebraicNumber[src]

impl From<i64> for RealAlgebraicNumber[src]

impl From<Ratio<i64>> for RealAlgebraicNumber[src]

impl From<i128> for RealAlgebraicNumber[src]

impl From<Ratio<i128>> for RealAlgebraicNumber[src]

impl From<isize> for RealAlgebraicNumber[src]

impl From<Ratio<isize>> for RealAlgebraicNumber[src]

impl From<BigInt> for RealAlgebraicNumber[src]

impl From<Ratio<BigInt>> for RealAlgebraicNumber[src]

impl Clone for RealAlgebraicNumber[src]

impl Eq for RealAlgebraicNumber[src]

impl Ord for RealAlgebraicNumber[src]

impl PartialEq<RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl PartialOrd<RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl Debug for RealAlgebraicNumber[src]

impl Div<RealAlgebraicNumber> for RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the / operator.

impl<'_> Div<RealAlgebraicNumber> for &'_ RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the / operator.

impl<'_> Div<&'_ RealAlgebraicNumber> for RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the / operator.

impl<'a, 'b> Div<&'a RealAlgebraicNumber> for &'b RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the / operator.

impl Rem<RealAlgebraicNumber> for RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the % operator.

impl<'_> Rem<RealAlgebraicNumber> for &'_ RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the % operator.

impl<'_> Rem<&'_ RealAlgebraicNumber> for RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the % operator.

impl<'a, 'b> Rem<&'a RealAlgebraicNumber> for &'b RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the % operator.

impl Sub<RealAlgebraicNumber> for RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the - operator.

impl<'_> Sub<&'_ RealAlgebraicNumber> for RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the - operator.

impl<'_> Sub<RealAlgebraicNumber> for &'_ RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the - operator.

impl<'a, 'b> Sub<&'a RealAlgebraicNumber> for &'b RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the - operator.

impl Add<RealAlgebraicNumber> for RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the + operator.

impl<'_> Add<&'_ RealAlgebraicNumber> for RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the + operator.

impl<'_> Add<RealAlgebraicNumber> for &'_ RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the + operator.

impl<'a, 'b> Add<&'a RealAlgebraicNumber> for &'b RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the + operator.

impl Mul<RealAlgebraicNumber> for RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the * operator.

impl<'_> Mul<&'_ RealAlgebraicNumber> for RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the * operator.

impl<'_> Mul<RealAlgebraicNumber> for &'_ RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the * operator.

impl<'a, 'b> Mul<&'a RealAlgebraicNumber> for &'b RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the * operator.

impl<'_> Neg for &'_ RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the - operator.

impl Neg for RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The resulting type after applying the - operator.

impl AddAssign<RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl<'_> AddAssign<&'_ RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl SubAssign<RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl<'_> SubAssign<&'_ RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl MulAssign<RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl<'_> MulAssign<&'_ RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl DivAssign<RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl<'_> DivAssign<&'_ RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl RemAssign<RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl<'_> RemAssign<&'_ RealAlgebraicNumber> for RealAlgebraicNumber[src]

impl Num for RealAlgebraicNumber[src]

type FromStrRadixErr = RealAlgebraicNumberParseError

impl One for RealAlgebraicNumber[src]

impl<E: IntoRationalExponent> Pow<E> for RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The result after applying the operator.

impl<'_, E: IntoRationalExponent> Pow<E> for &'_ RealAlgebraicNumber[src]

type Output = RealAlgebraicNumber

The result after applying the operator.

impl Signed for RealAlgebraicNumber[src]

fn signum(&self) -> Self[src]

Returns the sign of the number.

  • 0 if the number is zero
  • 1 if the number is positive
  • -1 if the number is negative

impl Zero for RealAlgebraicNumber[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]

impl<T> NumRef for T where
    T: Num + NumOps<&'r T, T>, 
[src]

impl<T, Base> RefNum<Base> for T where
    T: NumOps<Base, Base> + NumOps<&'r Base, Base>, 
[src]

impl<T, Rhs> NumAssignOps<Rhs> for T where
    T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, 
[src]

impl<T> NumAssign for T where
    T: Num + NumAssignOps<T>, 
[src]

impl<T> NumAssignRef for T where
    T: NumAssign + NumAssignOps<&'r T>, 
[src]