示例#1
0
文件: gmp.go 项目: 2thetop/go
// Lsh sets z = x << s and returns z.
func (z *Int) Lsh(x *Int, s uint) *Int {
	x.doinit()
	z.doinit()
	C._mpz_mul_2exp(&z.i[0], &x.i[0], C.ulong(s))
	return z
}
示例#2
0
文件: int.go 项目: jamesadney/gmp
// Lsh sets z = x << s and returns z.
func (z *Int) Lsh(x *Int, s uint) *Int {
	x.doinit()
	z.doinit()
	C._mpz_mul_2exp(z.ptr, x.ptr, C.ulong(s))
	return z
}