I128

Struct I128 

Source
pub struct I128;

Trait Implementations§

Source§

impl Congruence<i128> for I128

Source§

fn congruence(a: T, b: T, n: T) -> Result<T, String>

Returns congruence result 8x = 2 (mod 17) ax = b (mod n)
Source§

impl Euc<i128> for I128

Source§

fn euc(d1: T, d2: T) -> T

Returns normal euclidean algorithm result.
Source§

fn euc_from_vec(d: Vec<T>) -> Result<T, String>

Returns normal euclidean algorithm result from 2 or more numbers.
Source§

fn euc_recursive(d1: T, d2: T) -> T

Returns normal euclidean algorithm result but uses recursion insted of loop.
Source§

impl EucExt<i128> for I128

Source§

fn euc_ext(d1: T, d2: T) -> EucRes<T>

Returns extended euclidean algorithm result.
Source§

impl Lcm<i128> for I128

Source§

fn lcm(d1: T, d2: T) -> T

Returns least common multiple.
Source§

fn lcm_recursive(d1: T, d2: T) -> T

Returns least common multiple but uses recursive euclides.
Source§

fn lcm_from_vec(d: Vec<T>) -> Result<T, String>

Returns least common multiple from 2 or more numbers.

Auto Trait Implementations§

§

impl Freeze for I128

§

impl RefUnwindSafe for I128

§

impl Send for I128

§

impl Sync for I128

§

impl Unpin for I128

§

impl UnwindSafe for I128

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> 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, 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.