pub struct BigFixedDecimal9(BigInt);Expand description
A fixed-point decimal arithmetic for 9 decimal places. This type represents
a number x by the integer x * 10^9, backed by a BigInt.
Tuple Fields§
§0: BigIntImplementations§
Trait Implementations§
Source§impl Add<&BigFixedDecimal9> for &BigFixedDecimal9
impl Add<&BigFixedDecimal9> for &BigFixedDecimal9
Source§type Output = BigFixedDecimal9
type Output = BigFixedDecimal9
The resulting type after applying the
+ operator.Source§fn add(self, rhs: &BigFixedDecimal9) -> BigFixedDecimal9
fn add(self, rhs: &BigFixedDecimal9) -> BigFixedDecimal9
Performs the
+ operation. Read moreSource§impl Add<&BigFixedDecimal9> for BigFixedDecimal9
impl Add<&BigFixedDecimal9> for BigFixedDecimal9
Source§impl Add for BigFixedDecimal9
impl Add for BigFixedDecimal9
Source§impl AddAssign<&BigFixedDecimal9> for BigFixedDecimal9
impl AddAssign<&BigFixedDecimal9> for BigFixedDecimal9
Source§fn add_assign(&mut self, rhs: &Self)
fn add_assign(&mut self, rhs: &Self)
Performs the
+= operation. Read moreSource§impl AddAssign for BigFixedDecimal9
impl AddAssign for BigFixedDecimal9
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Clone for BigFixedDecimal9
impl Clone for BigFixedDecimal9
Source§fn clone(&self) -> BigFixedDecimal9
fn clone(&self) -> BigFixedDecimal9
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BigFixedDecimal9
impl Debug for BigFixedDecimal9
Source§impl Display for BigFixedDecimal9
impl Display for BigFixedDecimal9
Source§impl Div<&BigInt> for &BigFixedDecimal9
impl Div<&BigInt> for &BigFixedDecimal9
Source§type Output = BigFixedDecimal9
type Output = BigFixedDecimal9
The resulting type after applying the
/ operator.Source§impl Div<BigInt> for BigFixedDecimal9
impl Div<BigInt> for BigFixedDecimal9
Source§impl DivAssign<&BigInt> for BigFixedDecimal9
impl DivAssign<&BigInt> for BigFixedDecimal9
Source§fn div_assign(&mut self, rhs: &BigInt)
fn div_assign(&mut self, rhs: &BigInt)
Performs the
/= operation. Read moreSource§impl Mul<&BigFixedDecimal9> for &BigFixedDecimal9
impl Mul<&BigFixedDecimal9> for &BigFixedDecimal9
Source§type Output = BigFixedDecimal9
type Output = BigFixedDecimal9
The resulting type after applying the
* operator.Source§fn mul(self, rhs: &BigFixedDecimal9) -> BigFixedDecimal9
fn mul(self, rhs: &BigFixedDecimal9) -> BigFixedDecimal9
Performs the
* operation. Read moreSource§impl Mul<&BigFixedDecimal9> for BigFixedDecimal9
impl Mul<&BigFixedDecimal9> for BigFixedDecimal9
Source§impl Mul<&BigInt> for &BigFixedDecimal9
impl Mul<&BigInt> for &BigFixedDecimal9
Source§type Output = BigFixedDecimal9
type Output = BigFixedDecimal9
The resulting type after applying the
* operator.Source§impl Mul<BigInt> for BigFixedDecimal9
impl Mul<BigInt> for BigFixedDecimal9
Source§impl Mul for BigFixedDecimal9
impl Mul for BigFixedDecimal9
Source§impl MulAssign<&BigFixedDecimal9> for BigFixedDecimal9
impl MulAssign<&BigFixedDecimal9> for BigFixedDecimal9
Source§fn mul_assign(&mut self, rhs: &Self)
fn mul_assign(&mut self, rhs: &Self)
Performs the
*= operation. Read moreSource§impl MulAssign for BigFixedDecimal9
impl MulAssign for BigFixedDecimal9
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl One for BigFixedDecimal9
impl One for BigFixedDecimal9
Source§impl PartialEq for BigFixedDecimal9
impl PartialEq for BigFixedDecimal9
Source§impl PartialOrd for BigFixedDecimal9
impl PartialOrd for BigFixedDecimal9
Source§impl Product for BigFixedDecimal9
impl Product for BigFixedDecimal9
Source§impl Rational<BigInt> for BigFixedDecimal9
impl Rational<BigInt> for BigFixedDecimal9
Source§fn ratio_i(num: BigInt, denom: BigInt) -> Self
fn ratio_i(num: BigInt, denom: BigInt) -> Self
Obtains a number equal to the ratio between the given numerator and
denominator.
Source§fn to_f64(&self) -> f64
fn to_f64(&self) -> f64
Converts a number into its floating-point approximation. This can be
useful to print approximation of large numbers.
Source§fn is_exact() -> bool
fn is_exact() -> bool
Whether this type represents exact arithmetic, i.e.
Self::epsilon()
is zero.Source§fn description() -> &'static str
fn description() -> &'static str
Description of the implemented arithmetic, e.g. “64-bit floating point
arithmetic”.
Source§fn mul_up(&self, rhs: &Self) -> Self
fn mul_up(&self, rhs: &Self) -> Self
Multiplication, rounding up for types that perform a rounding on this
operation.
Source§fn div_up_as_keep_factor(&self, rhs: &Self) -> Self
fn div_up_as_keep_factor(&self, rhs: &Self) -> Self
Performs a division to obtain a keep factor. The division is rounded up
for types that cannot compute the result precisely. Additionally,
types may further round the result, which can be useful with exact
arithmetic, to avoid complexity explosion of rational numbers.
Source§fn from_usize(i: usize) -> Self
fn from_usize(i: usize) -> Self
Obtains a number equal to the given integer.
Source§impl Sub<&BigFixedDecimal9> for &BigFixedDecimal9
impl Sub<&BigFixedDecimal9> for &BigFixedDecimal9
Source§type Output = BigFixedDecimal9
type Output = BigFixedDecimal9
The resulting type after applying the
- operator.Source§fn sub(self, rhs: &BigFixedDecimal9) -> BigFixedDecimal9
fn sub(self, rhs: &BigFixedDecimal9) -> BigFixedDecimal9
Performs the
- operation. Read moreSource§impl Sub<&BigFixedDecimal9> for BigFixedDecimal9
impl Sub<&BigFixedDecimal9> for BigFixedDecimal9
Source§impl Sub for BigFixedDecimal9
impl Sub for BigFixedDecimal9
Source§impl SubAssign<&BigFixedDecimal9> for BigFixedDecimal9
impl SubAssign<&BigFixedDecimal9> for BigFixedDecimal9
Source§fn sub_assign(&mut self, rhs: &Self)
fn sub_assign(&mut self, rhs: &Self)
Performs the
-= operation. Read moreSource§impl SubAssign for BigFixedDecimal9
impl SubAssign for BigFixedDecimal9
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreSource§impl<'a> Sum<&'a BigFixedDecimal9> for BigFixedDecimal9
impl<'a> Sum<&'a BigFixedDecimal9> for BigFixedDecimal9
Source§impl Sum for BigFixedDecimal9
impl Sum for BigFixedDecimal9
Source§impl Zero for BigFixedDecimal9
impl Zero for BigFixedDecimal9
impl Eq for BigFixedDecimal9
impl RationalRef<&BigInt, BigFixedDecimal9> for &BigFixedDecimal9
impl StructuralPartialEq for BigFixedDecimal9
Auto Trait Implementations§
impl Freeze for BigFixedDecimal9
impl RefUnwindSafe for BigFixedDecimal9
impl Send for BigFixedDecimal9
impl Sync for BigFixedDecimal9
impl Unpin for BigFixedDecimal9
impl UnwindSafe for BigFixedDecimal9
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more