def __float__(self): return gmp.mpfr_get_d(self._mpfr, gmp.MPFR_RNDN)
def __complex__(self): return complex( gmp.mpfr_get_d(gmp.mpc_realref(self._mpc), gmp.MPFR_RNDN), gmp.mpfr_get_d(gmp.mpc_imagref(self._mpc), gmp.MPFR_RNDN))
def __trunc__(self): tmp_mpfr = _new_mpfr() gmp.mpfr_trunc(tmp_mpfr, self._mpfr) res = gmp.mpfr_get_d(tmp_mpfr, gmp.MPFR_RNDN) _del_mpfr(tmp_mpfr) return res
def __complex__(self): return complex( gmp.mpfr_get_d(gmp.mpc_realref(self._mpc), gmp.MPFR_RNDN), gmp.mpfr_get_d(gmp.mpc_imagref(self._mpc), gmp.MPFR_RNDN), )