public static Int128 operator <<(Int128 a, int b) { Int128 c; UInt128.LeftShift(out c.v, ref a.v, b); return(c); }
public void Uint128LeftShiftLowOverflowTest2() { var n = new UInt128(0UL, 1UL); var n2 = n.LeftShift(100); var sb = UInt128.FromBigInteger(BigInteger.One << 100); Assert.AreEqual(sb, n2); }
public void Uint128LeftShiftLowOverflowTest() { var n = new UInt128(0UL, UInt64.MaxValue); var n2 = n.LeftShift(1); Assert.AreEqual(1UL, n2.High); Assert.AreEqual(18446744073709551614UL, n2.Low); }
public static void LeftShift(ref Int128 c) { UInt128.LeftShift(ref c.v); }
public static void LeftShift(ref Int128 c, int d) { UInt128.LeftShift(ref c.v, d); }