fn denominator(self) -> i128 {
        if self.n_frac_digits == 0 || self.coeff == 0 {
            // self is equivalent to an integer
            return 1;
        }
        let gcd = gcd_special(self.coeff, self.n_frac_digits as u32);
        ten_pow(self.n_frac_digits) / gcd
    }
/// Returns the smallest positive denominator from the pairs of integers
/// with a ratio equal to `self`.
///
/// # Examples
///
/// ```rust
/// # use fpdec::{Dec, Decimal, AsIntegerRatio};
/// let d = Dec!(12345.00);
/// assert_eq!(d.denominator(), 1);
/// let d = Dec!(28.27095);
/// assert_eq!(d.denominator(), 20000);
/// ```
Returns the smallest positive denominator from the pairs of integers
with a ratio equal to `self`.
Returns the smallest positive denominator from the pairs of integers with a ratio equal to ` self ` .
fn denominator(self) -> i128 {
        if self.n_frac_digits == 0 || self.coeff == 0 {
            // self is equivalent to an integer
            return 1;
        }
        let gcd = gcd_special(self.coeff, self.n_frac_digits as u32);
        ten_pow(self.n_frac_digits) / gcd
    }
fn denominator ( self ) -> i128 { if self . n_frac_digits == 0 || self . coeff == 0 { // self is equivalent to an integer return 1 ; } let gcd = gcd_special ( self . coeff , self . n_frac_digits as u32 ) ; ten_pow ( self . n_frac_digits ) / gcd }
Returns the smallest positive denominator from the pairs of integers
with a ratio equal to `self`.
Returns the smallest positive denominator from the pairs of integers with a ratio equal to ` self ` .
self
examples
None
use fpdec::{dec, decimal, asintegerratio};
None