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