internal static void MultByTwo(this RawNum num) { UInt32 leadingBit = 0; for (int i = 0; i < num.Size; i++) { UInt32 res = num.Digits[i] << 1; res |= leadingBit; leadingBit = (res >> 16) & 1; num.Digits[i] = res & UInt16.MaxValue; } if (leadingBit > 0) { num.Digits.Add(leadingBit); } }
internal void CopyFrom(RawNum other) { this.Digits.Clear(); this.Digits.AddRange(other.Digits); }
internal static OmgNum OmgWrapper(this RawNum num) { return(new OmgNum(num)); }