Ejemplo n.º 1
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;
            }
        }
Ejemplo n.º 2
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();
     }
 }
Ejemplo n.º 3
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();
 }