[−][src]Struct large_int::large_int::LargeInt
An unsigned integer that is unbounded in both positive and negative.
Implementations
impl LargeInt
[src]
pub fn new() -> LargeInt
[src]
Returns a default LargeInt (default == 0)
Examples
use large_int::large_int::LargeInt; let zero = LargeInt::new();
pub fn is_negative(&self) -> bool
[src]
Checks if this value is negative
Examples
use large_int::large_int::LargeInt; let neg = LargeInt::from(-1); let pos = LargeInt::from(1); assert!(neg.is_negative()); assert!(!pos.is_negative());
Returns true if this LargeInt is negative, false otherwise
pub fn is_positive(&self) -> bool
[src]
Checks if this value is positive
Examples
use large_int::large_int::LargeInt; let neg = LargeInt::from(-1); let pos = LargeInt::from(1); assert!(!neg.is_positive()); assert!(pos.is_positive());
Returns true if this LargeInt is positive, false otherwise
pub fn count_ones(&self) -> u32
[src]
Counts the number of 1's in the binary representation of this LargeInt
Examples
use large_int::large_int::LargeInt; let two = LargeInt::from(2); assert!(two.count_ones() == 1);
Returns the number of 1's in this binary representation
pub fn div_with_remainder(self, other: LargeInt) -> (LargeInt, LargeInt)
[src]
Divides self by other and returns both the result and remainder
Examples
use large_int::large_int::LargeInt; let ten = LargeInt::from(10); let five = LargeInt::from(4); let (result, remainder) = ten.div_with_remainder(five); assert!(result == LargeInt::from(2)); assert!(remainder == LargeInt::from(2));
Returns a pair of LargeInts that represent the result and remainder of the division respectively.
Panics
Panics if other is 0
Trait Implementations
impl Add<LargeInt> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: LargeInt) -> LargeInt
[src]
Adds two LargeInts
Examples
use large_int::large_int::LargeInt; let ten = LargeInt::from(10); let two = LargeInt::from(2); assert!(ten + two == LargeInt::from(12));
Returns a LargeInt as the sum of the two LargeInts
impl Add<LargeInt> for i8
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: LargeInt) -> LargeInt
[src]
impl Add<LargeInt> for usize
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: LargeInt) -> LargeInt
[src]
impl Add<LargeInt> for i32
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: LargeInt) -> LargeInt
[src]
impl Add<LargeInt> for i64
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: LargeInt) -> LargeInt
[src]
impl Add<LargeInt> for i128
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: LargeInt) -> LargeInt
[src]
impl Add<LargeInt> for isize
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: LargeInt) -> LargeInt
[src]
impl Add<LargeInt> for u8
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: LargeInt) -> LargeInt
[src]
impl Add<LargeInt> for u32
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: LargeInt) -> LargeInt
[src]
impl Add<LargeInt> for u64
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: LargeInt) -> LargeInt
[src]
impl Add<LargeInt> for u128
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: LargeInt) -> LargeInt
[src]
impl Add<i128> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: i128) -> LargeInt
[src]
impl Add<i32> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: i32) -> LargeInt
[src]
impl Add<i64> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: i64) -> LargeInt
[src]
impl Add<i8> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: i8) -> LargeInt
[src]
impl Add<isize> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: isize) -> LargeInt
[src]
impl Add<u128> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: u128) -> LargeInt
[src]
impl Add<u32> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: u32) -> LargeInt
[src]
impl Add<u64> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: u64) -> LargeInt
[src]
impl Add<u8> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: u8) -> LargeInt
[src]
impl Add<usize> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the +
operator.
fn add(self, other: usize) -> LargeInt
[src]
impl AddAssign<LargeInt> for LargeInt
[src]
fn add_assign(&mut self, other: LargeInt)
[src]
Adds a LargeInt to this LargeInt
Examples
use large_int::large_int::LargeInt; let mut ten = LargeInt::from(10); let two = LargeInt::from(2); ten += two; assert!(ten == LargeInt::from(12));
impl AddAssign<i128> for LargeInt
[src]
fn add_assign(&mut self, other: i128)
[src]
impl AddAssign<i32> for LargeInt
[src]
fn add_assign(&mut self, other: i32)
[src]
impl AddAssign<i64> for LargeInt
[src]
fn add_assign(&mut self, other: i64)
[src]
impl AddAssign<i8> for LargeInt
[src]
fn add_assign(&mut self, other: i8)
[src]
impl AddAssign<isize> for LargeInt
[src]
fn add_assign(&mut self, other: isize)
[src]
impl AddAssign<u128> for LargeInt
[src]
fn add_assign(&mut self, other: u128)
[src]
impl AddAssign<u32> for LargeInt
[src]
fn add_assign(&mut self, other: u32)
[src]
impl AddAssign<u64> for LargeInt
[src]
fn add_assign(&mut self, other: u64)
[src]
impl AddAssign<u8> for LargeInt
[src]
fn add_assign(&mut self, other: u8)
[src]
impl AddAssign<usize> for LargeInt
[src]
fn add_assign(&mut self, other: usize)
[src]
impl BitAnd<LargeInt> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the &
operator.
fn bitand(self, rhs: LargeInt) -> LargeInt
[src]
Performs a bitwise and on two LargeInts
Examples
use large_int::large_int::LargeInt; let three = LargeInt::from(3); let two = LargeInt::from(2); assert!(three & two == LargeInt::from(2));
Returns the bitwise and as a LargeInt
impl BitAndAssign<LargeInt> for LargeInt
[src]
fn bitand_assign(&mut self, rhs: LargeInt)
[src]
Bitwise ands this LargeInt with another
Examples
use large_int::large_int::LargeInt; let mut three = LargeInt::from(3); let two = LargeInt::from(2); three &= two; assert!(three == LargeInt::from(2));
impl BitOr<LargeInt> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the |
operator.
fn bitor(self, rhs: LargeInt) -> LargeInt
[src]
Bitwise ors two LargeInts
Examples
use large_int::large_int::LargeInt; let five = LargeInt::from(5); let two = LargeInt::from(2); assert!(five | two == LargeInt::from(7));
Returns the bitwise or as a LargeInt
impl BitOrAssign<LargeInt> for LargeInt
[src]
fn bitor_assign(&mut self, rhs: LargeInt)
[src]
Bitwise ors this LargeInt with another
Examples
use large_int::large_int::LargeInt; let mut five = LargeInt::from(5); let two = LargeInt::from(2); five |= two; assert!(five == LargeInt::from(7));
impl BitXor<LargeInt> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the ^
operator.
fn bitxor(self, other: LargeInt) -> LargeInt
[src]
Bitwise xors two LargeInts
Examples
use large_int::large_int::LargeInt; let five = LargeInt::from(5); let three = LargeInt::from(3); assert!(five ^ three == LargeInt::from(6));
Returns the bitwise xor as a LargeInt
impl BitXorAssign<LargeInt> for LargeInt
[src]
fn bitxor_assign(&mut self, other: LargeInt)
[src]
Bitwise ors this LargeInt by another
Examples
use large_int::large_int::LargeInt; let mut five = LargeInt::from(5); let three = LargeInt::from(3); five ^= three; assert!(five == LargeInt::from(6));
impl Clone for LargeInt
[src]
impl Debug for LargeInt
[src]
impl Display for LargeInt
[src]
fn fmt(&self, f: &mut Formatter) -> FmtResult
[src]
Converts a LargeInt into a string representation
Examples
use std::string::ToString; use large_int::large_int::LargeInt; let five = LargeInt::from(5); let four = LargeInt::from(445); assert!(five.to_string() == "5"); assert!(format!("{:.1}", four) == "4.4e2");
Returns a Result of whether or not the conversion was successful
impl Div<LargeInt> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: LargeInt) -> LargeInt
[src]
impl Div<LargeInt> for i8
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: LargeInt) -> LargeInt
[src]
impl Div<LargeInt> for usize
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: LargeInt) -> LargeInt
[src]
impl Div<LargeInt> for i32
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: LargeInt) -> LargeInt
[src]
impl Div<LargeInt> for i64
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: LargeInt) -> LargeInt
[src]
impl Div<LargeInt> for i128
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: LargeInt) -> LargeInt
[src]
impl Div<LargeInt> for isize
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: LargeInt) -> LargeInt
[src]
impl Div<LargeInt> for u8
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: LargeInt) -> LargeInt
[src]
impl Div<LargeInt> for u32
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: LargeInt) -> LargeInt
[src]
impl Div<LargeInt> for u64
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: LargeInt) -> LargeInt
[src]
impl Div<LargeInt> for u128
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: LargeInt) -> LargeInt
[src]
impl Div<i128> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: i128) -> LargeInt
[src]
impl Div<i32> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: i32) -> LargeInt
[src]
impl Div<i64> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: i64) -> LargeInt
[src]
impl Div<i8> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: i8) -> LargeInt
[src]
impl Div<isize> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: isize) -> LargeInt
[src]
impl Div<u128> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: u128) -> LargeInt
[src]
impl Div<u32> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: u32) -> LargeInt
[src]
impl Div<u64> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: u64) -> LargeInt
[src]
impl Div<u8> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: u8) -> LargeInt
[src]
impl Div<usize> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the /
operator.
fn div(self, other: usize) -> LargeInt
[src]
impl DivAssign<LargeInt> for LargeInt
[src]
fn div_assign(&mut self, other: LargeInt)
[src]
impl DivAssign<i128> for LargeInt
[src]
fn div_assign(&mut self, other: i128)
[src]
impl DivAssign<i32> for LargeInt
[src]
fn div_assign(&mut self, other: i32)
[src]
impl DivAssign<i64> for LargeInt
[src]
fn div_assign(&mut self, other: i64)
[src]
impl DivAssign<i8> for LargeInt
[src]
fn div_assign(&mut self, other: i8)
[src]
impl DivAssign<isize> for LargeInt
[src]
fn div_assign(&mut self, other: isize)
[src]
impl DivAssign<u128> for LargeInt
[src]
fn div_assign(&mut self, other: u128)
[src]
impl DivAssign<u32> for LargeInt
[src]
fn div_assign(&mut self, other: u32)
[src]
impl DivAssign<u64> for LargeInt
[src]
fn div_assign(&mut self, other: u64)
[src]
impl DivAssign<u8> for LargeInt
[src]
fn div_assign(&mut self, other: u8)
[src]
impl DivAssign<usize> for LargeInt
[src]
fn div_assign(&mut self, other: usize)
[src]
impl From<i128> for LargeInt
[src]
impl From<i32> for LargeInt
[src]
impl From<i64> for LargeInt
[src]
impl From<i8> for LargeInt
[src]
impl From<isize> for LargeInt
[src]
impl From<u128> for LargeInt
[src]
impl From<u32> for LargeInt
[src]
impl From<u64> for LargeInt
[src]
impl From<u8> for LargeInt
[src]
impl From<usize> for LargeInt
[src]
impl FromStr for LargeInt
[src]
type Err = ParseIntError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<LargeInt, ParseIntError>
[src]
Creates a LargeInt from a string
Examples
use std::str::FromStr; use large_int::large_int::LargeInt; let five_str = LargeInt::from_str("5").unwrap(); let five = LargeInt::from(5); assert!(five == five_str);
Returns a Result of either a LargeInt representation of the decimal string (Ok), or a ParseIntError (Err)
impl Mul<LargeInt> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: LargeInt) -> LargeInt
[src]
Multiplies two LargeInts
Examples
use large_int::large_int::LargeInt; let ten = LargeInt::from(10); let two = LargeInt::from(2); assert!(ten * two == LargeInt::from(20));
Returns a LargeInt that is the product of the two LargeInts given
impl Mul<LargeInt> for i8
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: LargeInt) -> LargeInt
[src]
impl Mul<LargeInt> for usize
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: LargeInt) -> LargeInt
[src]
impl Mul<LargeInt> for i32
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: LargeInt) -> LargeInt
[src]
impl Mul<LargeInt> for i64
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: LargeInt) -> LargeInt
[src]
impl Mul<LargeInt> for i128
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: LargeInt) -> LargeInt
[src]
impl Mul<LargeInt> for isize
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: LargeInt) -> LargeInt
[src]
impl Mul<LargeInt> for u8
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: LargeInt) -> LargeInt
[src]
impl Mul<LargeInt> for u32
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: LargeInt) -> LargeInt
[src]
impl Mul<LargeInt> for u64
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: LargeInt) -> LargeInt
[src]
impl Mul<LargeInt> for u128
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: LargeInt) -> LargeInt
[src]
impl Mul<i128> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: i128) -> LargeInt
[src]
impl Mul<i32> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: i32) -> LargeInt
[src]
impl Mul<i64> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: i64) -> LargeInt
[src]
impl Mul<i8> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: i8) -> LargeInt
[src]
impl Mul<isize> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: isize) -> LargeInt
[src]
impl Mul<u128> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: u128) -> LargeInt
[src]
impl Mul<u32> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: u32) -> LargeInt
[src]
impl Mul<u64> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: u64) -> LargeInt
[src]
impl Mul<u8> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: u8) -> LargeInt
[src]
impl Mul<usize> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the *
operator.
fn mul(self, other: usize) -> LargeInt
[src]
impl MulAssign<LargeInt> for LargeInt
[src]
fn mul_assign(&mut self, rhs: LargeInt)
[src]
Multiplies this LargeInt by another
Examples
use large_int::large_int::LargeInt; let mut ten = LargeInt::from(10); let two = LargeInt::from(2); ten *= two; assert!(ten == LargeInt::from(20));
impl MulAssign<i128> for LargeInt
[src]
fn mul_assign(&mut self, other: i128)
[src]
impl MulAssign<i32> for LargeInt
[src]
fn mul_assign(&mut self, other: i32)
[src]
impl MulAssign<i64> for LargeInt
[src]
fn mul_assign(&mut self, other: i64)
[src]
impl MulAssign<i8> for LargeInt
[src]
fn mul_assign(&mut self, other: i8)
[src]
impl MulAssign<isize> for LargeInt
[src]
fn mul_assign(&mut self, other: isize)
[src]
impl MulAssign<u128> for LargeInt
[src]
fn mul_assign(&mut self, other: u128)
[src]
impl MulAssign<u32> for LargeInt
[src]
fn mul_assign(&mut self, other: u32)
[src]
impl MulAssign<u64> for LargeInt
[src]
fn mul_assign(&mut self, other: u64)
[src]
impl MulAssign<u8> for LargeInt
[src]
fn mul_assign(&mut self, other: u8)
[src]
impl MulAssign<usize> for LargeInt
[src]
fn mul_assign(&mut self, other: usize)
[src]
impl Neg for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn neg(self) -> LargeInt
[src]
Negates a LargeInt
Examples
use large_int::large_int::LargeInt; let five = LargeInt::from(5); assert!(-five == LargeInt::from(-5));
Returns the negated integer as a LargeInt
impl Not for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the !
operator.
fn not(self) -> LargeInt
[src]
Get the C equivalent "not" of a LargeInt
Examples
use large_int::large_int::LargeInt; let five = LargeInt::from(5); assert!(!five == LargeInt::from(0));
Returns, as a LargeInt, 0 if self != 0, or 1 otherwise
impl PartialEq<LargeInt> for LargeInt
[src]
impl PartialOrd<LargeInt> for LargeInt
[src]
fn partial_cmp(&self, other: &LargeInt) -> Option<Ordering>
[src]
Determines if a LargeInt is larger, equal or greater than another.
Examples
use large_int::large_int::LargeInt; let five = LargeInt::from(5); let four = LargeInt::from(4); assert!(five > four); assert!(four < five);
Returns an ordering of the comparison
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Rem<LargeInt> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: LargeInt) -> LargeInt
[src]
Gets the remainder of a division operation
Examples
use large_int::large_int::LargeInt; let ten = LargeInt::from(11); let two = LargeInt::from(5); assert!(ten % two == LargeInt::from(1));
Returns the remainder as a LargeInt
impl Rem<LargeInt> for i8
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: LargeInt) -> LargeInt
[src]
impl Rem<LargeInt> for usize
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: LargeInt) -> LargeInt
[src]
impl Rem<LargeInt> for i32
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: LargeInt) -> LargeInt
[src]
impl Rem<LargeInt> for i64
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: LargeInt) -> LargeInt
[src]
impl Rem<LargeInt> for i128
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: LargeInt) -> LargeInt
[src]
impl Rem<LargeInt> for isize
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: LargeInt) -> LargeInt
[src]
impl Rem<LargeInt> for u8
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: LargeInt) -> LargeInt
[src]
impl Rem<LargeInt> for u32
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: LargeInt) -> LargeInt
[src]
impl Rem<LargeInt> for u64
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: LargeInt) -> LargeInt
[src]
impl Rem<LargeInt> for u128
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: LargeInt) -> LargeInt
[src]
impl Rem<i128> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: i128) -> LargeInt
[src]
impl Rem<i32> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: i32) -> LargeInt
[src]
impl Rem<i64> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: i64) -> LargeInt
[src]
impl Rem<i8> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: i8) -> LargeInt
[src]
impl Rem<isize> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: isize) -> LargeInt
[src]
impl Rem<u128> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: u128) -> LargeInt
[src]
impl Rem<u32> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: u32) -> LargeInt
[src]
impl Rem<u64> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: u64) -> LargeInt
[src]
impl Rem<u8> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: u8) -> LargeInt
[src]
impl Rem<usize> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the %
operator.
fn rem(self, other: usize) -> LargeInt
[src]
impl RemAssign<LargeInt> for LargeInt
[src]
fn rem_assign(&mut self, other: LargeInt)
[src]
Assigns the remainder of this LargeInt divided by another
Examples
use large_int::large_int::LargeInt; let mut eleven = LargeInt::from(11); let five = LargeInt::from(5); eleven %= five; assert!(eleven == LargeInt::from(1));
impl RemAssign<i128> for LargeInt
[src]
fn rem_assign(&mut self, other: i128)
[src]
impl RemAssign<i32> for LargeInt
[src]
fn rem_assign(&mut self, other: i32)
[src]
impl RemAssign<i64> for LargeInt
[src]
fn rem_assign(&mut self, other: i64)
[src]
impl RemAssign<i8> for LargeInt
[src]
fn rem_assign(&mut self, other: i8)
[src]
impl RemAssign<isize> for LargeInt
[src]
fn rem_assign(&mut self, other: isize)
[src]
impl RemAssign<u128> for LargeInt
[src]
fn rem_assign(&mut self, other: u128)
[src]
impl RemAssign<u32> for LargeInt
[src]
fn rem_assign(&mut self, other: u32)
[src]
impl RemAssign<u64> for LargeInt
[src]
fn rem_assign(&mut self, other: u64)
[src]
impl RemAssign<u8> for LargeInt
[src]
fn rem_assign(&mut self, other: u8)
[src]
impl RemAssign<usize> for LargeInt
[src]
fn rem_assign(&mut self, other: usize)
[src]
impl Shl<usize> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the <<
operator.
fn shl(self, bits: usize) -> LargeInt
[src]
Shifts the bits left in a LargeInt by bits. Overflow is lost.
Examples
use large_int::large_int::LargeInt; let five = LargeInt::from(5); assert!(five << 1 == LargeInt::from(10));
Returns the shifted bits as a LargeInt
impl ShlAssign<usize> for LargeInt
[src]
fn shl_assign(&mut self, bits: usize)
[src]
Shifts the bits left in this LargeInt by bits. Overflow is lost.
Examples
use large_int::large_int::LargeInt; let mut five = LargeInt::from(5); five <<= 1; assert!(five == LargeInt::from(10));
impl Shr<usize> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the >>
operator.
fn shr(self, bits: usize) -> LargeInt
[src]
Shifts the bits right in a LargeInt by bits. Overflow is lost.
Examples
use large_int::large_int::LargeInt; let ten = LargeInt::from(10); assert!(ten >> 1 == LargeInt::from(5));
Returns the shifted bits as a LargeInt
impl ShrAssign<usize> for LargeInt
[src]
fn shr_assign(&mut self, bits: usize)
[src]
Shifts the bits right in this LargeInt by bits. Overflow is lost.
Examples
use large_int::large_int::LargeInt; let mut ten = LargeInt::from(10); ten >>= 1; assert!(ten == LargeInt::from(5));
impl StructuralPartialEq for LargeInt
[src]
impl Sub<LargeInt> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: LargeInt) -> LargeInt
[src]
Subtracts a LargeInt from another
Examples
use large_int::large_int::LargeInt; let ten = LargeInt::from(10); let two = LargeInt::from(2); assert!(ten - two == LargeInt::from(8));
Returns self minus other as a LargeInt
impl Sub<LargeInt> for i8
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: LargeInt) -> LargeInt
[src]
impl Sub<LargeInt> for usize
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: LargeInt) -> LargeInt
[src]
impl Sub<LargeInt> for i32
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: LargeInt) -> LargeInt
[src]
impl Sub<LargeInt> for i64
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: LargeInt) -> LargeInt
[src]
impl Sub<LargeInt> for i128
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: LargeInt) -> LargeInt
[src]
impl Sub<LargeInt> for isize
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: LargeInt) -> LargeInt
[src]
impl Sub<LargeInt> for u8
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: LargeInt) -> LargeInt
[src]
impl Sub<LargeInt> for u32
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: LargeInt) -> LargeInt
[src]
impl Sub<LargeInt> for u64
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: LargeInt) -> LargeInt
[src]
impl Sub<LargeInt> for u128
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: LargeInt) -> LargeInt
[src]
impl Sub<i128> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: i128) -> LargeInt
[src]
impl Sub<i32> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: i32) -> LargeInt
[src]
impl Sub<i64> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: i64) -> LargeInt
[src]
impl Sub<i8> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: i8) -> LargeInt
[src]
impl Sub<isize> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: isize) -> LargeInt
[src]
impl Sub<u128> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: u128) -> LargeInt
[src]
impl Sub<u32> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: u32) -> LargeInt
[src]
impl Sub<u64> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: u64) -> LargeInt
[src]
impl Sub<u8> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: u8) -> LargeInt
[src]
impl Sub<usize> for LargeInt
[src]
type Output = LargeInt
The resulting type after applying the -
operator.
fn sub(self, other: usize) -> LargeInt
[src]
impl SubAssign<LargeInt> for LargeInt
[src]
fn sub_assign(&mut self, other: LargeInt)
[src]
Subtracts a LargeInt from this LargeInt
Examples
use large_int::large_int::LargeInt; let mut ten = LargeInt::from(10); let two = LargeInt::from(2); ten -= two; assert!(ten == LargeInt::from(8));
impl SubAssign<i128> for LargeInt
[src]
fn sub_assign(&mut self, other: i128)
[src]
impl SubAssign<i32> for LargeInt
[src]
fn sub_assign(&mut self, other: i32)
[src]
impl SubAssign<i64> for LargeInt
[src]
fn sub_assign(&mut self, other: i64)
[src]
impl SubAssign<i8> for LargeInt
[src]
fn sub_assign(&mut self, other: i8)
[src]
impl SubAssign<isize> for LargeInt
[src]
fn sub_assign(&mut self, other: isize)
[src]
impl SubAssign<u128> for LargeInt
[src]
fn sub_assign(&mut self, other: u128)
[src]
impl SubAssign<u32> for LargeInt
[src]
fn sub_assign(&mut self, other: u32)
[src]
impl SubAssign<u64> for LargeInt
[src]
fn sub_assign(&mut self, other: u64)
[src]
impl SubAssign<u8> for LargeInt
[src]
fn sub_assign(&mut self, other: u8)
[src]
impl SubAssign<usize> for LargeInt
[src]
fn sub_assign(&mut self, other: usize)
[src]
Auto Trait Implementations
impl RefUnwindSafe for LargeInt
impl Send for LargeInt
impl Sync for LargeInt
impl Unpin for LargeInt
impl UnwindSafe for LargeInt
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,