Struct dashu::rational::RBig

source ·
pub struct RBig(/* private fields */);
Expand description

An arbitrary precision rational number.

This struct represents an rational number with arbitrarily large numerator and denominator based on UBig and IBig.

Implementations§

source§

impl RBig

source

pub fn to_f32_fast(&self) -> f32

Convert the rational number to a f32.

The rounding follows the default IEEE 754 behavior (rounds to nearest, ties to even).

The rounding will be correct at most of the time, but in rare cases the mantissa can be off by one bit. Use RBig::to_f32 for ensured correct rounding.

§Examples
assert_eq!(RBig::ONE.to_f32_fast(), 1f32);

let r = RBig::from_parts(22.into(), 7u8.into());
assert_eq!(r.to_f32_fast(), 22./7.)
source

pub fn to_f64_fast(&self) -> f64

Convert the rational number to a f64.

The rounding follows the default IEEE 754 behavior (rounds to nearest, ties to even).

The rounding will be correct at most of the time, but in rare cases the mantissa can be off by one bit. Use RBig::to_f64 for ensured correct rounding.

§Examples
assert_eq!(RBig::ONE.to_f64_fast(), 1f64);

let r = RBig::from_parts(22.into(), 7u8.into());
assert_eq!(r.to_f64_fast(), 22./7.)
source

pub fn to_f32(&self) -> Approximation<f32, Sign>

Convert the rational number to a f32 with guaranteed correct rounding.

The rounding follows the default IEEE 754 behavior (rounds to nearest, ties to even).

Because of the guaranteed rounding, it might take a long time to convert when the numerator and denominator are large. In this case RBig::to_f32_fast can be used if the correct rounding is not required.

§Examples
assert_eq!(RBig::ONE.to_f32(), Exact(1f32));

let r = RBig::from_parts(22.into(), 7u8.into());
// f32 representation of 22/7 is smaller than the actual 22/7
assert_eq!(r.to_f32(), Inexact(22./7., Negative));
source

pub fn to_f64(&self) -> Approximation<f64, Sign>

Convert the rational number to a f64 with guaranteed correct rounding.

The rounding follows the default IEEE 754 behavior (rounds to nearest, ties to even).

Because of the guaranteed rounding, it might take a long time to convert when the numerator and denominator are large. In this case RBig::to_f64_fast can be used if the correct rounding is not required.

§Examples
assert_eq!(RBig::ONE.to_f64(), Exact(1f64));

let r = RBig::from_parts(22.into(), 7u8.into());
// f64 representation of 22/7 is smaller than the actual 22/7
assert_eq!(r.to_f64(), Inexact(22./7., Negative));
source

pub fn to_int(&self) -> Approximation<IBig, RBig>

Convert the rational number to an IBig.

The conversion rounds toward zero. It’s equivalent to RBig::trunc, but it returns the fractional part if the rational number is not an integer.

§Examples
let a = RBig::from_parts(22.into(), UBig::ONE);
assert_eq!(a.to_int(), Exact(IBig::from(22)));

let b = RBig::from_parts(22.into(), 7u8.into());
assert_eq!(b.to_int(), Inexact(
    IBig::from(3), RBig::from_parts(1.into(), 7u8.into())
));
source§

impl RBig

source

pub fn sqr(&self) -> RBig

Compute the square of the number (self * self).

§Examples
let a = RBig::from_parts(2.into(), 3u8.into());
let a2 = RBig::from_parts(4.into(), 9u8.into());
assert_eq!(a.sqr(), a2);
source

pub fn cubic(&self) -> RBig

Compute the cubic of the number (self * self * self).

§Examples
let a = RBig::from_parts(2.into(), 3u8.into());
let a3 = RBig::from_parts(8.into(), 27u8.into());
assert_eq!(a.cubic(), a3);
source

pub fn pow(&self, n: usize) -> RBig

Raise this number to a power of n.

§Examples
let a = RBig::from_parts(2.into(), 3u8.into());
let a5 = RBig::from_parts(32.into(), 243u8.into());
assert_eq!(a.pow(5), a5);
source§

impl RBig

source

pub fn from_str_radix(src: &str, radix: u32) -> Result<RBig, ParseError>

Convert a string in a given base to RBig.

The numerator and the denominator are separated by /. src may contain an optional + prefix. Digits 10-35 are represented by a-z or A-Z.

§Examples
assert_eq!(
    RBig::from_str_radix("+7ab/-sse", 32)?,
    RBig::from_parts((-7499).into(), 29582u16.into())
);
source

pub fn from_str_with_radix_prefix(src: &str) -> Result<(RBig, u32), ParseError>

Convert a string with optional radix prefixes to RBig, return the parsed integer and radix. If no prefix is present, then the default radix 10 will be used for parsing.

src may contain an ‘+’ or - prefix before the radix prefix of both the numerator and denominator.

Allowed prefixes: 0b for binary, 0o for octal, 0x for hexadecimal.

If the radix prefixes for the numerator and the denominator are not the same, then a ParseError will be returned. The radix prefix for the denominator can be omitted, and the radix for the numerator will used for parsing.

§Examples
assert_eq!(RBig::from_str_with_radix_prefix("+0o17/25")?,
    (RBig::from_parts(0o17.into(), 0o25u8.into()), 8));
assert_eq!(RBig::from_str_with_radix_prefix("-0x1f/-0x1e")?,
    (RBig::from_parts(0x1f.into(), 0x1eu8.into()), 16));
source§

impl RBig

source

pub const ZERO: RBig = _

RBig with value 0

source

pub const ONE: RBig = _

RBig with value 1

source

pub const NEG_ONE: RBig = _

RBig with value -1

source

pub fn from_parts(numerator: IBig, denominator: UBig) -> RBig

Create a rational number from a signed numerator and an unsigned denominator

§Examples
assert_eq!(RBig::from_parts(IBig::ZERO, UBig::ONE), RBig::ZERO);
assert_eq!(RBig::from_parts(IBig::ONE, UBig::ONE), RBig::ONE);
assert_eq!(RBig::from_parts(IBig::NEG_ONE, UBig::ONE), RBig::NEG_ONE);
source

pub fn into_parts(self) -> (IBig, UBig)

Convert the rational number into (numerator, denumerator) parts.

§Examples
assert_eq!(RBig::ZERO.into_parts(), (IBig::ZERO, UBig::ONE));
assert_eq!(RBig::ONE.into_parts(), (IBig::ONE, UBig::ONE));
assert_eq!(RBig::NEG_ONE.into_parts(), (IBig::NEG_ONE, UBig::ONE));
source

pub fn from_parts_signed(numerator: IBig, denominator: IBig) -> RBig

Create a rational number from a signed numerator and a signed denominator

§Examples
assert_eq!(RBig::from_parts_signed(1.into(), 1.into()), RBig::ONE);
assert_eq!(RBig::from_parts_signed(12.into(), (-12).into()), RBig::NEG_ONE);
source

pub const fn from_parts_const( sign: Sign, numerator: u128, denominator: u128, ) -> RBig

Create a rational number in a const context

The magnitude of the numerator and the denominator is limited to a DoubleWord.

§Examples
const ONE: RBig = RBig::from_parts_const(Sign::Positive, 1, 1);
assert_eq!(ONE, RBig::ONE);
const NEG_ONE: RBig = RBig::from_parts_const(Sign::Negative, 1, 1);
assert_eq!(NEG_ONE, RBig::NEG_ONE);
source

pub fn numerator(&self) -> &IBig

Get the numerator of the rational number

§Examples
assert_eq!(RBig::ZERO.numerator(), &IBig::ZERO);
assert_eq!(RBig::ONE.numerator(), &IBig::ONE);
source

pub fn denominator(&self) -> &UBig

Get the denominator of the rational number

§Examples
assert_eq!(RBig::ZERO.denominator(), &UBig::ONE);
assert_eq!(RBig::ONE.denominator(), &UBig::ONE);
source

pub fn relax(self) -> Relaxed

Convert this rational number into a Relaxed version

§Examples
assert_eq!(RBig::ZERO.relax(), Relaxed::ZERO);
assert_eq!(RBig::ONE.relax(), Relaxed::ONE);
source

pub const fn as_relaxed(&self) -> &Relaxed

Regard the number as a Relaxed number and return a reference of Relaxed type.

§Examples
assert_eq!(RBig::ONE.as_relaxed(), &Relaxed::ONE);
source

pub const fn is_zero(&self) -> bool

Check whether the number is 0

§Examples
assert!(RBig::ZERO.is_zero());
assert!(!RBig::ONE.is_zero());
source

pub const fn is_one(&self) -> bool

Check whether the number is 1

§Examples
assert!(!RBig::ZERO.is_one());
assert!(RBig::ONE.is_one());
source

pub const fn is_int(&self) -> bool

Determine if the number can be regarded as an integer.

§Examples
assert!(RBig::ZERO.is_int());
assert!(RBig::ONE.is_int());
source§

impl RBig

source

pub fn split_at_point(self) -> (IBig, RBig)

Split the rational number into integral and fractional parts (split at the radix point).

It’s return is equivalent to (self.trunc(), self.fract())

§Examples
assert_eq!(RBig::ONE.split_at_point(), (IBig::ONE, RBig::ZERO));

let a = RBig::from_parts(22.into(), 7u8.into());
let (trunc, fract) = a.split_at_point();
assert_eq!(trunc, IBig::from(3));
assert_eq!(fract, RBig::from_parts(1.into(), 7u8.into()));
source

pub fn ceil(&self) -> IBig

Compute the least integer that is greater than or equal to this number.

§Examples
assert_eq!(RBig::ONE.ceil(), IBig::ONE);

let a = RBig::from_parts(22.into(), 7u8.into());
assert_eq!(a.ceil(), IBig::from(4));
source

pub fn floor(&self) -> IBig

Compute the greatest integer that is less than or equal to this number.

§Examples
assert_eq!(RBig::ONE.floor(), IBig::ONE);

let a = RBig::from_parts(22.into(), 7u8.into());
assert_eq!(a.floor(), IBig::from(3));
source

pub fn round(&self) -> IBig

Compute the integer that closest to this number.

It will return the one farther from zero when the number has the 1/2 as its fractional part.

§Examples
assert_eq!(RBig::ONE.round(), IBig::ONE);

let a = RBig::from_parts(22.into(), 7u8.into());
assert_eq!(a.round(), IBig::from(3));
source

pub fn trunc(&self) -> IBig

Returns the integral part of the rational number.

It’s guaranteed that self == self.trunc() + self.fract().

§Examples
assert_eq!(RBig::ONE.trunc(), IBig::ONE);

let a = RBig::from_parts(22.into(), 7u8.into());
assert_eq!(a.trunc(), IBig::from(3));
source

pub fn fract(&self) -> RBig

Returns the fractional part of the rational number

It’s guaranteed that self == self.trunc() + self.fract().

§Examples
assert_eq!(RBig::ONE.fract(), RBig::ZERO);

let a = RBig::from_parts(22.into(), 7u8.into());
assert_eq!(a.fract(), RBig::from_parts(1.into(), 7u8.into()));
source§

impl RBig

source

pub const fn sign(&self) -> Sign

Get the sign of the number. Zero value has a positive sign.

§Examples
assert_eq!(RBig::ZERO.sign(), Sign::Positive);
assert_eq!(RBig::ONE.sign(), Sign::Positive);
assert_eq!(RBig::NEG_ONE.sign(), Sign::Negative);
source

pub const fn signum(&self) -> RBig

A number representing the sign of self.

§Examples

let r = RBig::from_parts((-10).into(), 5u8.into());
assert_eq!(r.signum(), RBig::NEG_ONE);
source§

impl RBig

source

pub fn is_simpler_than(&self, other: &RBig) -> bool

Determine if this rational number is simpler than the other number.

This method only make sense for canonicalized ratios.

source

pub fn simplest_from_f32(f: f32) -> Option<RBig>

Find the simplest rational number in the rounding interval of the f32 number.

This method returns None when the floating point value is not representable by a rational number, such as infinities or nans.

See RBig::simplest_in for the definition of simplicity.

The rounding interval of a f32 value is an interval such that all numbers in this range will rounded to this f32 value. For example the rounding interval for 1f32 is [1. - f32::EPSILON / 2, 1. + f32::EPSILON / 2]. That is, the error of result value will be less than 1/2 ULP.

This method can be used to recover the original fraction represented as a division of f32. See the examples below.

§Examples
assert_eq!(
    RBig::simplest_from_f32(1e-1).unwrap(),
    RBig::from_parts(1.into(), 10u8.into())
);
assert_eq!(
    RBig::simplest_from_f32(22./7.).unwrap(),
    RBig::from_parts(22.into(), 7u8.into())
);
source

pub fn simplest_from_f64(f: f64) -> Option<RBig>

Find the simplest rational number in the rounding interval of the f64 number.

This method returns None when the floating point value is not representable by a rational number, such as infinities or nans.

See RBig::simplest_in for the definition of simplicity.

The rounding interval of a f64 value is an interval such that all numbers in this range will rounded to this f64 value. For example the rounding interval for 1f64 is [1. - f64::EPSILON / 2, 1. + f64::EPSILON / 2]. That is, the error of result value will be less than 1/2 ULP.

This method can be used to recover the original fraction represented as a division of f64. See the examples below.

§Examples
assert_eq!(
    RBig::simplest_from_f64(1e-1).unwrap(),
    RBig::from_parts(1.into(), 10u8.into())
);
assert_eq!(
    RBig::simplest_from_f64(22./7.).unwrap(),
    RBig::from_parts(22.into(), 7u8.into())
);
source

pub fn simplest_in(lower: RBig, upper: RBig) -> RBig

Find the simplest rational number in the open interval (lower, upper).

A rational n₁/d₁ is simpler than another rational number n₂/d₂ if:

  • d₁ < d₂ (compare denominator)
  • or |n₁| < |n₂| (then compare the magnitude of numerator)
  • or n₂ < 0 < n₁ (then compare the sign)

lower and upper will be swapped if necessary. If lower and upper are the same number, then this number will be directly returned.

§Examples
let a = RBig::from_parts(1234.into(), 5678u16.into());
let b = RBig::from_parts(1235.into(), 5679u16.into());
let s = RBig::simplest_in(a, b);
// 1234/5678 < 5/23 < 1235/5679
assert_eq!(s, RBig::from_parts(5.into(), 23u8.into()));
source

pub fn nearest(&self, limit: &UBig) -> Approximation<RBig, Sign>

Find the closest rational number to this number with a limit of the denominator.

If the denominator of this number is larger than the limit, then it returns the closest one between self.next_up() and self.next_down() to self. If the denominator of this number is already less than or equal to the limit, then Exact(self) will be returned.

The error |self - self.nearest()| will be less than 1/(2*limit), and the sign of the error self - self.nearest() will be returned if the result is not Exact.

§Examples
let a: RBig = 3.141592653.try_into().unwrap();
assert_eq!(a.nearest(&10u8.into()), Inexact(
    RBig::from_parts(22.into(), 7u8.into()),
    Sign::Positive // 22/7 > 3.141592653
));
source

pub fn next_up(&self, limit: &UBig) -> RBig

Find the closest rational number that is greater than this number and has a denominator less than limit.

It’s equivalent to finding the next element in Farey sequence of order limit. The error |self - self.next_up()| will be less than 1/limit.

§Examples
let a: RBig = 3.141592653.try_into().unwrap();
assert_eq!(a.next_up(&10u8.into()), RBig::from_parts(22.into(), 7u8.into()));
source

pub fn next_down(&self, limit: &UBig) -> RBig

Find the closest rational number that is less than this number and has a denominator less than limit.

It’s equivalent to finding the previous element in Farey sequence of order limit. The error |self - self.next_down()| will be less than 1/limit.

§Examples
let a: RBig = 3.141592653.try_into().unwrap();
assert_eq!(a.next_down(&10u8.into()), RBig::from_parts(25.into(), 8u8.into()));
source§

impl RBig

source

pub fn to_float<R, const B: u64>( &self, precision: usize, ) -> Approximation<FBig<R, B>, Rounding>
where R: Round,

Convert the rational number to a FBig with guaranteed correct rounding.

§Examples
use dashu_float::{DBig, round::Rounding::*};

assert_eq!(RBig::ONE.to_float(1), Exact(DBig::ONE));
assert_eq!(RBig::from(1000).to_float(4), Exact(DBig::from(1000)));
assert_eq!(RBig::from_parts(1000.into(), 6u8.into()).to_float(4),
    Inexact(DBig::from_parts(1667.into(), -1), AddOne));
source

pub fn simplest_from_float<R, const B: u64>(f: &FBig<R, B>) -> Option<RBig>
where R: ErrorBounds,

§Examples
use dashu_float::DBig;

let f = DBig::from_str_native("4.00")? / DBig::from_str_native("3.00")?;
let r = RBig::from_str_radix("4/3", 10)?;
assert_eq!(RBig::simplest_from_float(&f), Some(r));
assert_eq!(RBig::simplest_from_float(&DBig::INFINITY), None);

Trait Implementations§

source§

impl Abs for RBig

§

type Output = RBig

source§

fn abs(self) -> <RBig as Abs>::Output

source§

impl AbsEq for RBig

source§

fn abs_eq(&self, other: &RBig) -> bool

👎Deprecated since 0.5.0: AbsEq will be moved in AbsOrd in v0.5
source§

impl<R, const B: u64> AbsOrd<FBig<R, B>> for RBig
where R: Round,

source§

fn abs_cmp(&self, other: &FBig<R, B>) -> Ordering

source§

impl AbsOrd<IBig> for RBig

source§

fn abs_cmp(&self, other: &IBig) -> Ordering

source§

impl<R, const B: u64> AbsOrd<RBig> for FBig<R, B>
where R: Round,

source§

fn abs_cmp(&self, other: &RBig) -> Ordering

source§

impl AbsOrd<RBig> for IBig

source§

fn abs_cmp(&self, other: &RBig) -> Ordering

source§

impl AbsOrd<RBig> for Relaxed

source§

fn abs_cmp(&self, other: &RBig) -> Ordering

source§

impl AbsOrd<RBig> for UBig

source§

fn abs_cmp(&self, other: &RBig) -> Ordering

source§

impl AbsOrd<Relaxed> for RBig

source§

fn abs_cmp(&self, other: &Relaxed) -> Ordering

source§

impl AbsOrd<UBig> for RBig

source§

fn abs_cmp(&self, other: &UBig) -> Ordering

source§

impl AbsOrd for RBig

source§

fn abs_cmp(&self, other: &RBig) -> Ordering

source§

impl<'l, 'r> Add<&'r IBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: &IBig) -> RBig

Performs the + operation. Read more
source§

impl<'r> Add<&'r IBig> for RBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: &IBig) -> RBig

Performs the + operation. Read more
source§

impl<'l, 'r> Add<&'r RBig> for &'l IBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: &RBig) -> RBig

Performs the + operation. Read more
source§

impl<'l, 'r> Add<&'r RBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: &RBig) -> RBig

Performs the + operation. Read more
source§

impl<'l, 'r> Add<&'r RBig> for &'l UBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: &RBig) -> RBig

Performs the + operation. Read more
source§

impl<'r> Add<&'r RBig> for IBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: &RBig) -> RBig

Performs the + operation. Read more
source§

impl<'r> Add<&'r RBig> for RBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: &RBig) -> RBig

Performs the + operation. Read more
source§

impl<'r> Add<&'r RBig> for UBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: &RBig) -> RBig

Performs the + operation. Read more
source§

impl<'l, 'r> Add<&'r UBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: &UBig) -> RBig

Performs the + operation. Read more
source§

impl<'r> Add<&'r UBig> for RBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: &UBig) -> RBig

Performs the + operation. Read more
source§

impl<'l> Add<IBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: IBig) -> RBig

Performs the + operation. Read more
source§

impl Add<IBig> for RBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: IBig) -> RBig

Performs the + operation. Read more
source§

impl<'l> Add<RBig> for &'l IBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: RBig) -> RBig

Performs the + operation. Read more
source§

impl<'l> Add<RBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: RBig) -> RBig

Performs the + operation. Read more
source§

impl<'l> Add<RBig> for &'l UBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: RBig) -> RBig

Performs the + operation. Read more
source§

impl Add<RBig> for IBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: RBig) -> RBig

Performs the + operation. Read more
source§

impl Add<RBig> for UBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: RBig) -> RBig

Performs the + operation. Read more
source§

impl<'l> Add<UBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: UBig) -> RBig

Performs the + operation. Read more
source§

impl Add<UBig> for RBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: UBig) -> RBig

Performs the + operation. Read more
source§

impl Add for RBig

§

type Output = RBig

The resulting type after applying the + operator.
source§

fn add(self, rhs: RBig) -> RBig

Performs the + operation. Read more
source§

impl AddAssign<&RBig> for RBig

source§

fn add_assign(&mut self, rhs: &RBig)

Performs the += operation. Read more
source§

impl AddAssign for RBig

source§

fn add_assign(&mut self, rhs: RBig)

Performs the += operation. Read more
source§

impl Clone for RBig

source§

fn clone(&self) -> RBig

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &RBig)

Performs copy-assignment from source. Read more
source§

impl Debug for RBig

source§

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

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

impl Default for RBig

source§

fn default() -> RBig

Returns the “default value” for a type. Read more
source§

impl Display for RBig

source§

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

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

impl<'l, 'r> Div<&'r IBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the / operator.
source§

fn div(self, rhs: &IBig) -> RBig

Performs the / operation. Read more
source§

impl<'r> Div<&'r IBig> for RBig

§

type Output = RBig

The resulting type after applying the / operator.
source§

fn div(self, rhs: &IBig) -> RBig

Performs the / operation. Read more
source§

impl<'l, 'r> Div<&'r RBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the / operator.
source§

fn div(self, rhs: &RBig) -> RBig

Performs the / operation. Read more
source§

impl<'r> Div<&'r RBig> for RBig

§

type Output = RBig

The resulting type after applying the / operator.
source§

fn div(self, rhs: &RBig) -> RBig

Performs the / operation. Read more
source§

impl<'l, 'r> Div<&'r UBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the / operator.
source§

fn div(self, rhs: &UBig) -> RBig

Performs the / operation. Read more
source§

impl<'r> Div<&'r UBig> for RBig

§

type Output = RBig

The resulting type after applying the / operator.
source§

fn div(self, rhs: &UBig) -> RBig

Performs the / operation. Read more
source§

impl<'l> Div<IBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the / operator.
source§

fn div(self, rhs: IBig) -> RBig

Performs the / operation. Read more
source§

impl Div<IBig> for RBig

§

type Output = RBig

The resulting type after applying the / operator.
source§

fn div(self, rhs: IBig) -> RBig

Performs the / operation. Read more
source§

impl<'l> Div<RBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the / operator.
source§

fn div(self, rhs: RBig) -> RBig

Performs the / operation. Read more
source§

impl<'l> Div<UBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the / operator.
source§

fn div(self, rhs: UBig) -> RBig

Performs the / operation. Read more
source§

impl Div<UBig> for RBig

§

type Output = RBig

The resulting type after applying the / operator.
source§

fn div(self, rhs: UBig) -> RBig

Performs the / operation. Read more
source§

impl Div for RBig

§

type Output = RBig

The resulting type after applying the / operator.
source§

fn div(self, rhs: RBig) -> RBig

Performs the / operation. Read more
source§

impl DivAssign<&RBig> for RBig

source§

fn div_assign(&mut self, rhs: &RBig)

Performs the /= operation. Read more
source§

impl DivAssign for RBig

source§

fn div_assign(&mut self, rhs: RBig)

Performs the /= operation. Read more
source§

impl<'l, 'r> DivEuclid<&'r RBig> for &'l RBig

§

type Output = IBig

source§

fn div_euclid(self, rhs: &RBig) -> IBig

source§

impl<'r> DivEuclid<&'r RBig> for RBig

§

type Output = IBig

source§

fn div_euclid(self, rhs: &RBig) -> IBig

source§

impl<'l> DivEuclid<RBig> for &'l RBig

§

type Output = IBig

source§

fn div_euclid(self, rhs: RBig) -> IBig

source§

impl DivEuclid for RBig

§

type Output = IBig

source§

fn div_euclid(self, rhs: RBig) -> IBig

source§

impl<'l, 'r> DivRemEuclid<&'r RBig> for &'l RBig

source§

impl<'r> DivRemEuclid<&'r RBig> for RBig

source§

impl<'l> DivRemEuclid<RBig> for &'l RBig

source§

impl DivRemEuclid for RBig

source§

impl EstimatedLog2 for RBig

source§

fn log2_bounds(&self) -> (f32, f32)

Estimate the bounds of the binary logarithm. Read more
source§

fn log2_est(&self) -> f32

Estimate the value of the binary logarithm. It’s calculated as the average of log2_bounds by default.
source§

impl From<IBig> for RBig

source§

fn from(v: IBig) -> RBig

Converts to this type from the input type.
source§

impl<R, const B: u64> From<RBig> for FBig<R, B>
where R: Round,

source§

fn from(v: RBig) -> FBig<R, B>

Converts to this type from the input type.
source§

impl From<UBig> for RBig

source§

fn from(v: UBig) -> RBig

Converts to this type from the input type.
source§

impl From<i128> for RBig

source§

fn from(v: i128) -> RBig

Converts to this type from the input type.
source§

impl From<i16> for RBig

source§

fn from(v: i16) -> RBig

Converts to this type from the input type.
source§

impl From<i32> for RBig

source§

fn from(v: i32) -> RBig

Converts to this type from the input type.
source§

impl From<i64> for RBig

source§

fn from(v: i64) -> RBig

Converts to this type from the input type.
source§

impl From<i8> for RBig

source§

fn from(v: i8) -> RBig

Converts to this type from the input type.
source§

impl From<isize> for RBig

source§

fn from(v: isize) -> RBig

Converts to this type from the input type.
source§

impl From<u128> for RBig

source§

fn from(v: u128) -> RBig

Converts to this type from the input type.
source§

impl From<u16> for RBig

source§

fn from(v: u16) -> RBig

Converts to this type from the input type.
source§

impl From<u32> for RBig

source§

fn from(v: u32) -> RBig

Converts to this type from the input type.
source§

impl From<u64> for RBig

source§

fn from(v: u64) -> RBig

Converts to this type from the input type.
source§

impl From<u8> for RBig

source§

fn from(v: u8) -> RBig

Converts to this type from the input type.
source§

impl From<usize> for RBig

source§

fn from(v: usize) -> RBig

Converts to this type from the input type.
source§

impl FromStr for RBig

§

type Err = ParseError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<RBig, ParseError>

Parses a string s to return a value of this type. Read more
source§

impl Hash for RBig

source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Inverse for &RBig

§

type Output = RBig

source§

fn inv(self) -> RBig

source§

impl Inverse for RBig

§

type Output = RBig

source§

fn inv(self) -> RBig

source§

impl<'l, 'r> Mul<&'r IBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &IBig) -> RBig

Performs the * operation. Read more
source§

impl<'r> Mul<&'r IBig> for RBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &IBig) -> RBig

Performs the * operation. Read more
source§

impl<'l, 'r> Mul<&'r RBig> for &'l IBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &RBig) -> RBig

Performs the * operation. Read more
source§

impl<'l, 'r> Mul<&'r RBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &RBig) -> RBig

Performs the * operation. Read more
source§

impl<'l, 'r> Mul<&'r RBig> for &'l UBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &RBig) -> RBig

Performs the * operation. Read more
source§

impl<'r> Mul<&'r RBig> for IBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &RBig) -> RBig

Performs the * operation. Read more
source§

impl<'r> Mul<&'r RBig> for RBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &RBig) -> RBig

Performs the * operation. Read more
source§

impl<'r> Mul<&'r RBig> for UBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &RBig) -> RBig

Performs the * operation. Read more
source§

impl<'l, 'r> Mul<&'r UBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &UBig) -> RBig

Performs the * operation. Read more
source§

impl<'r> Mul<&'r UBig> for RBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &UBig) -> RBig

Performs the * operation. Read more
source§

impl<'l> Mul<IBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: IBig) -> RBig

Performs the * operation. Read more
source§

impl Mul<IBig> for RBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: IBig) -> RBig

Performs the * operation. Read more
source§

impl<'l> Mul<RBig> for &'l IBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: RBig) -> RBig

Performs the * operation. Read more
source§

impl<'l> Mul<RBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: RBig) -> RBig

Performs the * operation. Read more
source§

impl<'l> Mul<RBig> for &'l UBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: RBig) -> RBig

Performs the * operation. Read more
source§

impl Mul<RBig> for IBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: RBig) -> RBig

Performs the * operation. Read more
source§

impl Mul<RBig> for UBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: RBig) -> RBig

Performs the * operation. Read more
source§

impl Mul<Sign> for RBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Sign) -> RBig

Performs the * operation. Read more
source§

impl<'l> Mul<UBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: UBig) -> RBig

Performs the * operation. Read more
source§

impl Mul<UBig> for RBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: UBig) -> RBig

Performs the * operation. Read more
source§

impl Mul for RBig

§

type Output = RBig

The resulting type after applying the * operator.
source§

fn mul(self, rhs: RBig) -> RBig

Performs the * operation. Read more
source§

impl MulAssign<&RBig> for RBig

source§

fn mul_assign(&mut self, rhs: &RBig)

Performs the *= operation. Read more
source§

impl MulAssign for RBig

source§

fn mul_assign(&mut self, rhs: RBig)

Performs the *= operation. Read more
source§

impl Neg for &RBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn neg(self) -> <&RBig as Neg>::Output

Performs the unary - operation. Read more
source§

impl Neg for RBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn neg(self) -> <RBig as Neg>::Output

Performs the unary - operation. Read more
source§

impl NumHash for RBig

source§

fn num_hash<H>(&self, state: &mut H)
where H: Hasher,

Consistent Hash::hash on different numeric types. Read more
source§

impl<R, const B: u64> NumOrd<FBig<R, B>> for RBig
where R: Round,

source§

fn num_cmp(&self, other: &FBig<R, B>) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &FBig<R, B>) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<IBig> for RBig

source§

fn num_cmp(&self, other: &IBig) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &IBig) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl<R, const B: u64> NumOrd<RBig> for FBig<R, B>
where R: Round,

source§

fn num_cmp(&self, other: &RBig) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &RBig) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<RBig> for IBig

source§

fn num_cmp(&self, other: &RBig) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &RBig) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<RBig> for Relaxed

source§

fn num_eq(&self, other: &RBig) -> bool

PartialEq::eq on different numeric types
source§

fn num_partial_cmp(&self, other: &RBig) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_cmp(&self, other: &RBig) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<RBig> for UBig

source§

fn num_cmp(&self, other: &RBig) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &RBig) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<Relaxed> for RBig

source§

fn num_eq(&self, other: &Relaxed) -> bool

PartialEq::eq on different numeric types
source§

fn num_partial_cmp(&self, other: &Relaxed) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_cmp(&self, other: &Relaxed) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<UBig> for RBig

source§

fn num_cmp(&self, other: &UBig) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &UBig) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<f32> for RBig

source§

fn num_cmp(&self, other: &f32) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &f32) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<f64> for RBig

source§

fn num_cmp(&self, other: &f64) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &f64) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<i128> for RBig

source§

fn num_cmp(&self, other: &i128) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &i128) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<i16> for RBig

source§

fn num_cmp(&self, other: &i16) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &i16) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<i32> for RBig

source§

fn num_cmp(&self, other: &i32) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &i32) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<i64> for RBig

source§

fn num_cmp(&self, other: &i64) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &i64) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<i8> for RBig

source§

fn num_cmp(&self, other: &i8) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &i8) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<isize> for RBig

source§

fn num_cmp(&self, other: &isize) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &isize) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<u128> for RBig

source§

fn num_cmp(&self, other: &u128) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &u128) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<u16> for RBig

source§

fn num_cmp(&self, other: &u16) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &u16) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<u32> for RBig

source§

fn num_cmp(&self, other: &u32) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &u32) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<u64> for RBig

source§

fn num_cmp(&self, other: &u64) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &u64) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<u8> for RBig

source§

fn num_cmp(&self, other: &u8) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &u8) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl NumOrd<usize> for RBig

source§

fn num_cmp(&self, other: &usize) -> Ordering

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.
source§

fn num_partial_cmp(&self, other: &usize) -> Option<Ordering>

PartialOrd::partial_cmp on different numeric types
source§

fn num_eq(&self, other: &Other) -> bool

PartialEq::eq on different numeric types
source§

fn num_ne(&self, other: &Other) -> bool

PartialEq::ne on different numeric types
source§

fn num_lt(&self, other: &Other) -> bool

PartialOrd::lt on different numeric types
source§

fn num_le(&self, other: &Other) -> bool

PartialOrd::le on different numeric types
source§

fn num_gt(&self, other: &Other) -> bool

PartialOrd::gt on different numeric types
source§

fn num_ge(&self, other: &Other) -> bool

PartialOrd::ge on different numeric types
source§

impl Ord for RBig

source§

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

Restrict a value to a certain interval. Read more
source§

impl PartialEq for RBig

source§

fn eq(&self, other: &RBig) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for RBig

source§

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

This method 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

This method 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

This method 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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'l, 'r> Rem<&'r RBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &RBig) -> RBig

Performs the % operation. Read more
source§

impl<'r> Rem<&'r RBig> for RBig

§

type Output = RBig

The resulting type after applying the % operator.
source§

fn rem(self, rhs: &RBig) -> RBig

Performs the % operation. Read more
source§

impl<'l> Rem<RBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the % operator.
source§

fn rem(self, rhs: RBig) -> RBig

Performs the % operation. Read more
source§

impl Rem for RBig

§

type Output = RBig

The resulting type after applying the % operator.
source§

fn rem(self, rhs: RBig) -> RBig

Performs the % operation. Read more
source§

impl RemAssign<&RBig> for RBig

source§

fn rem_assign(&mut self, rhs: &RBig)

Performs the %= operation. Read more
source§

impl RemAssign for RBig

source§

fn rem_assign(&mut self, rhs: RBig)

Performs the %= operation. Read more
source§

impl<'l, 'r> RemEuclid<&'r RBig> for &'l RBig

§

type Output = RBig

source§

fn rem_euclid(self, rhs: &RBig) -> RBig

source§

impl<'r> RemEuclid<&'r RBig> for RBig

§

type Output = RBig

source§

fn rem_euclid(self, rhs: &RBig) -> RBig

source§

impl<'l> RemEuclid<RBig> for &'l RBig

§

type Output = RBig

source§

fn rem_euclid(self, rhs: RBig) -> RBig

source§

impl RemEuclid for RBig

§

type Output = RBig

source§

fn rem_euclid(self, rhs: RBig) -> RBig

source§

impl Signed for RBig

source§

fn sign(&self) -> Sign

source§

fn is_positive(&self) -> bool

source§

fn is_negative(&self) -> bool

source§

impl<'l, 'r> Sub<&'r IBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &IBig) -> RBig

Performs the - operation. Read more
source§

impl<'r> Sub<&'r IBig> for RBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &IBig) -> RBig

Performs the - operation. Read more
source§

impl<'l, 'r> Sub<&'r RBig> for &'l IBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &RBig) -> RBig

Performs the - operation. Read more
source§

impl<'l, 'r> Sub<&'r RBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &RBig) -> RBig

Performs the - operation. Read more
source§

impl<'l, 'r> Sub<&'r RBig> for &'l UBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &RBig) -> RBig

Performs the - operation. Read more
source§

impl<'r> Sub<&'r RBig> for IBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &RBig) -> RBig

Performs the - operation. Read more
source§

impl<'r> Sub<&'r RBig> for RBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &RBig) -> RBig

Performs the - operation. Read more
source§

impl<'r> Sub<&'r RBig> for UBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &RBig) -> RBig

Performs the - operation. Read more
source§

impl<'l, 'r> Sub<&'r UBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &UBig) -> RBig

Performs the - operation. Read more
source§

impl<'r> Sub<&'r UBig> for RBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &UBig) -> RBig

Performs the - operation. Read more
source§

impl<'l> Sub<IBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: IBig) -> RBig

Performs the - operation. Read more
source§

impl Sub<IBig> for RBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: IBig) -> RBig

Performs the - operation. Read more
source§

impl<'l> Sub<RBig> for &'l IBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: RBig) -> RBig

Performs the - operation. Read more
source§

impl<'l> Sub<RBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: RBig) -> RBig

Performs the - operation. Read more
source§

impl<'l> Sub<RBig> for &'l UBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: RBig) -> RBig

Performs the - operation. Read more
source§

impl Sub<RBig> for IBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: RBig) -> RBig

Performs the - operation. Read more
source§

impl Sub<RBig> for UBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: RBig) -> RBig

Performs the - operation. Read more
source§

impl<'l> Sub<UBig> for &'l RBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: UBig) -> RBig

Performs the - operation. Read more
source§

impl Sub<UBig> for RBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: UBig) -> RBig

Performs the - operation. Read more
source§

impl Sub for RBig

§

type Output = RBig

The resulting type after applying the - operator.
source§

fn sub(self, rhs: RBig) -> RBig

Performs the - operation. Read more
source§

impl SubAssign<&RBig> for RBig

source§

fn sub_assign(&mut self, rhs: &RBig)

Performs the -= operation. Read more
source§

impl SubAssign for RBig

source§

fn sub_assign(&mut self, rhs: RBig)

Performs the -= operation. Read more
source§

impl<R, const B: u64> TryFrom<FBig<R, B>> for RBig
where R: Round,

§

type Error = ConversionError

The type returned in the event of a conversion error.
source§

fn try_from( value: FBig<R, B>, ) -> Result<RBig, <RBig as TryFrom<FBig<R, B>>>::Error>

Performs the conversion.
source§

impl TryFrom<RBig> for IBig

§

type Error = ConversionError

The type returned in the event of a conversion error.
source§

fn try_from(value: RBig) -> Result<IBig, <IBig as TryFrom<RBig>>::Error>

Performs the conversion.
source§

impl TryFrom<RBig> for UBig

§

type Error = ConversionError

The type returned in the event of a conversion error.
source§

fn try_from(value: RBig) -> Result<UBig, <UBig as TryFrom<RBig>>::Error>

Performs the conversion.
source§

impl<const B: u64> TryFrom<Repr<B>> for RBig

§

type Error = ConversionError

The type returned in the event of a conversion error.
source§

fn try_from(value: Repr<B>) -> Result<RBig, <RBig as TryFrom<Repr<B>>>::Error>

Performs the conversion.
source§

impl TryFrom<f32> for RBig

§

type Error = ConversionError

The type returned in the event of a conversion error.
source§

fn try_from(value: f32) -> Result<RBig, <RBig as TryFrom<f32>>::Error>

Performs the conversion.
source§

impl TryFrom<f64> for RBig

§

type Error = ConversionError

The type returned in the event of a conversion error.
source§

fn try_from(value: f64) -> Result<RBig, <RBig as TryFrom<f64>>::Error>

Performs the conversion.
source§

impl Eq for RBig

Auto Trait Implementations§

§

impl Freeze for RBig

§

impl RefUnwindSafe for RBig

§

impl Send for RBig

§

impl Sync for RBig

§

impl Unpin for RBig

§

impl UnwindSafe for RBig

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> ToOwned for T
where T: Clone,

§

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§

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

§

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

§

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.