Esempio n. 1
0
            public static BigInt operator *(BigInt a, BigInt b)
            {
                BigInt temp = new BigInt(a), sum = new BigInt();

                for (int i = 0; i < b.number.Count; i++)
                {
                    temp = temp.MultOnDigit(b.number[i]);
                    temp = temp.MultOn10Pow(b.number.Count - i - 1);
                    sum  = sum + temp;
                    temp = new BigInt(a);
                }
                if (sum != new BigInt(0))
                {
                    sum.Sign = a.Sign * b.Sign;
                }
                else
                {
                    sum.Sign = 1;
                }
                return(sum);
            }