コード例 #1
0
        public static BitShiftAccumulator FromInt32(int smallNumber)
        {
            if (smallNumber < 0)
            {
                throw new ArgumentException("smallNumber(" + smallNumber +
                                            ") is less than 0");
            }
            var bsa = new BitShiftAccumulator(EInteger.Zero, 0, 0);

            bsa.shiftedSmall      = smallNumber;
            bsa.discardedBitCount = new FastInteger(0);
            bsa.isSmall           = true;
            return(bsa);
        }
コード例 #2
0
 public static BitShiftAccumulator FromInt32(int smallNumber) {
   if (smallNumber < 0) {
     throw new ArgumentException("smallNumber (" + smallNumber +
       ") is less than 0");
   }
   var bsa = new BitShiftAccumulator(EInteger.Zero, 0, 0);
   bsa.shiftedSmall = smallNumber;
   bsa.discardedBitCount = new FastInteger(0);
   bsa.isSmall = true;
   return bsa;
 }