예제 #1
0
파일: IntNum.cs 프로젝트: vic/ioke
 public static IntNum shift(IntNum x, int count)
 {
     if (x.words == null)
         {
             if (count <= 0)
                 return make (count > -32 ? x.ival >> (-count) : x.ival < 0 ? -1 : 0);
             if (count < 32)
                 return make ((long) x.ival << count);
         }
     if (count == 0)
         return x;
     IntNum result = new IntNum (0);
     result.setShift (x, count);
     return result.canonicalize ();
 }