Esempio n. 1
0
        public static SuperNumber operator -(SuperNumber number)
        {
            var res = new SuperNumber(-number.Suret, number.Mexrec);

            res.Normalize();
            return(res);
        }
Esempio n. 2
0
        public static SuperNumber operator /(ulong number1, SuperNumber number2)
        {
            var result = new SuperNumber(number2.Mexrec * number1, number2.Suret);

            result.Normalize();
            return(result);
        }
Esempio n. 3
0
        public static SuperNumber operator /(SuperNumber number1, ulong number2)
        {
            var result = new SuperNumber(number1.Suret, number1.Mexrec * number2);

            result.IxtisarEt();
            result.Normalize();
            return(result);
        }
Esempio n. 4
0
        public static SuperNumber operator *(SuperNumber number1, int number2)
        {
            var result = new SuperNumber(number1.Suret * number2, number1.Mexrec);

            result.IxtisarEt();
            result.Normalize();
            return(result);
        }
Esempio n. 5
0
        public static SuperNumber operator -(SuperNumber number1, ulong number2)
        {
            /*
             * a/b-c=(a-bc)/b
             */
            var newsuret = number1.Suret - number1.Mexrec * number2;
            var result   = new SuperNumber(newsuret, number1.Mexrec);

            result.IxtisarEt();
            result.Normalize();
            return(result);
        }
Esempio n. 6
0
        public static SuperNumber operator +(SuperNumber number1, int number2)
        {
            /*
             * a/b+c=(a+bc)/b
             */
            var newsuret = number1.Suret + number1.Mexrec * number2;
            var result   = new SuperNumber(newsuret, number1.Mexrec);

            result.IxtisarEt();
            result.Normalize();
            return(result);
        }
Esempio n. 7
0
        public static SuperNumber operator /(SuperNumber number1, SuperNumber number2)
        {
            /*
             * a/b /  c/d=ad/bc
             */
            var newmexrec = number1.Mexrec * number2.Suret;
            var newsuret  = number1.Suret * number2.Mexrec;
            var result    = new SuperNumber(newsuret, newmexrec);

            result.IxtisarEt();
            result.Normalize();
            return(result);
        }