[−][src]Struct boa::builtins::bigint::BigInt
BigInt implementation.
Implementations
impl BigInt[src]
pub fn from_string_radix(buf: &str, radix: u32) -> Option<Self>[src]
Converts a string to a BigInt with the specified radix.
pub fn to_string_radix(&self, radix: u32) -> String[src]
Convert bigint to string with radix.
pub fn to_f64(&self) -> f64[src]
Converts the BigInt to a f64 type.
Returns std::f64::INFINITY if the BigInt is too big.
impl BigInt[src]
pub fn pow(self, other: &Self) -> Self[src]
pub fn mod_floor(self, other: &Self) -> Self[src]
Floored integer modulo.
Examples
assert_eq!((8).mod_floor(&3), 2); assert_eq!((8).mod_floor(&-3), -1);
Trait Implementations
impl Add<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the + operator.
fn add(self, other: Self) -> Self[src]
impl BitAnd<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the & operator.
fn bitand(self, other: Self) -> Self[src]
impl BitOr<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the | operator.
fn bitor(self, other: Self) -> Self[src]
impl BitXor<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the ^ operator.
fn bitxor(self, other: Self) -> Self[src]
impl Clone for BigInt[src]
impl Debug for BigInt[src]
impl Default for BigInt[src]
impl Display for BigInt[src]
impl Div<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the / operator.
fn div(self, other: Self) -> Self[src]
impl Eq for BigInt[src]
impl Finalize for BigInt[src]
impl From<BigInt> for Value[src]
impl From<BigInt> for RcBigInt[src]
impl From<BigInt> for Const[src]
impl From<BigInt> for NumericLiteral[src]
impl From<i32> for BigInt[src]
impl From<i64> for BigInt[src]
impl Hash for BigInt[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl Mul<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the * operator.
fn mul(self, other: Self) -> Self[src]
impl Neg for BigInt[src]
type Output = Self
The resulting type after applying the - operator.
fn neg(self) -> Self::Output[src]
impl Ord for BigInt[src]
fn cmp(&self, other: &BigInt) -> Ordering[src]
#[must_use]fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self[src]
impl PartialEq<BigInt> for i32[src]
impl PartialEq<BigInt> for f64[src]
impl PartialEq<BigInt> for BigInt[src]
impl PartialEq<f64> for BigInt[src]
impl PartialEq<i32> for BigInt[src]
impl PartialOrd<BigInt> for BigInt[src]
fn partial_cmp(&self, other: &BigInt) -> Option<Ordering>[src]
fn lt(&self, other: &BigInt) -> bool[src]
fn le(&self, other: &BigInt) -> bool[src]
fn gt(&self, other: &BigInt) -> bool[src]
fn ge(&self, other: &BigInt) -> bool[src]
impl Rem<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the % operator.
fn rem(self, other: Self) -> Self[src]
impl Shl<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the << operator.
fn shl(self, other: Self) -> Self::Output[src]
impl Shr<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the >> operator.
fn shr(self, other: Self) -> Self::Output[src]
impl StructuralEq for BigInt[src]
impl StructuralPartialEq for BigInt[src]
impl Sub<BigInt> for BigInt[src]
type Output = Self
The resulting type after applying the - operator.
fn sub(self, other: Self) -> Self[src]
impl Trace for BigInt[src]
unsafe fn trace(&self)[src]
unsafe fn root(&self)[src]
unsafe fn unroot(&self)[src]
fn finalize_glue(&self)[src]
impl TryFrom<f64> for BigInt[src]
Auto Trait Implementations
impl RefUnwindSafe for BigInt
impl Send for BigInt
impl Sync for BigInt
impl Unpin for BigInt
impl UnwindSafe for BigInt
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, 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]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,