After using gmpy2.floor()
on an mpz
variable:
x = mpz(5)
x = gmpy2.floor(x/256)
x
has the type mpfr
and not mpz
anymore, even though to my understanding, floor always returns integers.
How can I avoid that?
I'm afraid using x = mpz(gmpy2.floor(x/256))
will reduce the performance, wont it?