Hi Denis,
If x is an mpf, mpz(int(x)) should work.
Fredrik
I'm not sure if I understand. If the mpf is integer-valued nothing
will be lost. If it has fractional digits, those will of course be
lost. You can convert an mpf to a mantissa and exponent losslessly
like this:
>>> x = mpf(100.25)
>>> x.man_exp
(mpz(401), -2) # 100.25 = 401 * 2.0**(-2)
Or, if you want an integer representing the decimal value, just use
str() and remove the dot.
Fredrik