Ejemplo n.º 1
0
        public Fraction FractReduct()
        {
            long     nsd      = DopClass.NSD(Numerator, Denominator);
            Fraction fractNew = new Fraction(Numerator / nsd, Denominator / nsd);

            return(fractNew);
        }
Ejemplo n.º 2
0
        public static Fraction operator /(Fraction fract1, Fraction fract2)
        {
            long numeration  = fract1.Numerator * fract2.Denominator;
            long denominator = fract1.Denominator * fract2.Numerator;
            long nsd         = DopClass.NSD(numeration, denominator);

            numeration  /= nsd;
            denominator /= nsd;
            return(new Fraction(numeration, denominator));
        }