예제 #1
0
 internal static void smethod_2(
     MutableBigInteger a,
     MutableBigInteger b,
     ref MutableBigInteger result)
 {
     if (a.isNegative == b.isNegative)
     {
         int resultLength;
         BigInteger.smethod_11(a.digits, a.length, b.digits, b.length, result.digits, out resultLength);
         result.length     = resultLength;
         result.isNegative = a.isNegative && result.length > 0;
     }
     else
     {
         if (a.method_3(b) < 0)
         {
             BigInteger.smethod_12(b.digits, b.length, a.digits, a.length, result.digits);
             result.isNegative = b.isNegative;
         }
         else
         {
             BigInteger.smethod_12(a.digits, a.length, b.digits, b.length, result.digits);
             result.isNegative = a.isNegative;
         }
         result.length = System.Math.Max(a.length, b.length);
         result.method_5();
     }
 }
예제 #2
0
        internal static void smethod_5(
            MutableBigInteger a,
            MutableBigInteger b,
            ref MutableBigInteger result)
        {
            int num = BigInteger.smethod_14(a.digits, a.length, b.digits, b.length);

            if (num < 0)
            {
                result.length     = BigInteger.smethod_13(b.digits, b.length, a.digits, a.length, result.digits);
                result.isNegative = !b.isNegative;
                result.method_5();
            }
            else if (num > 0)
            {
                result.length     = BigInteger.smethod_13(a.digits, a.length, b.digits, b.length, result.digits);
                result.isNegative = a.isNegative;
                result.method_5();
            }
            else
            {
                result.length     = 0;
                result.isNegative = false;
            }
        }
예제 #3
0
        public static void smethod_1(BigInteger value, ref MutableBigInteger result, int shift)
        {
            int resultLength;

            BigInteger.smethod_8(value.Digits, value.Length, result.digits, shift, out resultLength);
            result.isNegative = value.IsNegative;
            result.length     = resultLength;
        }
예제 #4
0
 internal static void smethod_3(
     MutableBigInteger a,
     MutableBigInteger b,
     ref MutableBigInteger result)
 {
     if (a.isNegative != b.isNegative)
     {
         int resultLength;
         BigInteger.smethod_11(a.digits, a.length, b.digits, b.length, result.digits, out resultLength);
         result.length     = resultLength;
         result.isNegative = a.isNegative && result.length > 0;
     }
     else
     {
         MutableBigInteger.smethod_4(a, b, ref result);
     }
 }
예제 #5
0
 internal static void smethod_4(
     MutableBigInteger a,
     MutableBigInteger b,
     ref MutableBigInteger result)
 {
     if (a.method_3(b) < 0)
     {
         BigInteger.smethod_12(b.digits, b.length, a.digits, a.length, result.digits);
         result.length     = b.length;
         result.isNegative = !b.isNegative;
     }
     else
     {
         BigInteger.smethod_12(a.digits, a.length, b.digits, b.length, result.digits);
         result.length     = a.length;
         result.isNegative = a.isNegative;
     }
     result.method_5();
 }
예제 #6
0
 public int method_3(MutableBigInteger other)
 {
     return(BigInteger.smethod_14(this.digits, this.length, other.digits, other.length));
 }