pub const fn new(num: i128, den: i128) -> Self {
        let neg = is_neg!(num) ^ is_neg!(den);

        let num = unsign!(num);
        let den = unsign!(den);

        let gcd = gcd_of(num, den);

        let num = num / gcd;
        let den = den / gcd;

        Frac {
            neg,
            num,
            den,
        }
    }
/// Instantiate a new fraction
///
/// This constructor takes as arguments the numerator and denominator, both
/// as i128s. The fraction will be simplified on initialization.
///
/// Examples:
/// ```
/// use frac::Frac;
///
/// let f = Frac::new(1, 2);
/// println!("{}", f); // 1/2
/// ```
Instantiate a new fraction
This constructor takes as arguments the numerator and denominator, both
as i128s. The fraction will be simplified on initialization.




Instantiate a new fraction This constructor takes as arguments the numerator and denominator both as i128s . The fraction will be simplified on initialization .
pub const fn new(num: i128, den: i128) -> Self {
        let neg = is_neg!(num) ^ is_neg!(den);
        let num = unsign!(num);
        let den = unsign!(den);
        let gcd = gcd_of(num, den);
        let num = num / gcd;
        let den = den / gcd;
        Frac {
            neg,
            num,
            den,
        }
    }
pub const fn new ( num : i128 , den : i128 ) -> Self { let neg = is_neg ! ( num ) ^ is_neg ! ( den ) ; let num = unsign ! ( num ) ; let den = unsign ! ( den ) ; let gcd = gcd_of ( num , den ) ; let num = num / gcd ; let den = den / gcd ; Frac { neg , num , den , } }
Instantiate a new fraction
This constructor takes as arguments the numerator and denominator, both
as i128s.
Instantiate a new fraction This constructor takes as arguments the numerator and denominator both as i128s .
num
i128
den
i128
num
i128
den
i128