Ejemplo n.º 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);
        }
Ejemplo n.º 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;
 }