// SetUint64 sets z to x and returns z. func (z *Int) SetUint64(x uint64) *Int { z.doinit() // Test for truncation y := C.ulong(x) if uint64(y) == x { C.mpz_set_ui(&z.i[0], y) } else { C.mpz_import(&z.i[0], 1, 0, 8, 0, 0, unsafe.Pointer(&x)) } return z }
// SetUint64 sets z to x and returns z. func (z *Int) SetUint64(x uint64) *Int { z.doinit() C.mpz_set_ui(z.ptr, C.ulong(x)) return z }