__version__ = '0.14'

from usertools import monitor, timing

from ctx_fp import FPContext
from ctx_mp import MPContext

fp = FPContext()
mp = MPContext()

fp._mp = mp
mp._mp = mp
mp._fp = fp
fp._fp = fp

# XXX: extremely bad pickle hack
import ctx_mp as _ctx_mp
_ctx_mp._mpf_module.mpf = mp.mpf
_ctx_mp._mpf_module.mpc = mp.mpc

make_mpf = mp.make_mpf
make_mpc = mp.make_mpc

extraprec = mp.extraprec
extradps = mp.extradps
workprec = mp.workprec
workdps = mp.workdps

mag = mp.mag

bernfrac = mp.bernfrac
Exemple #2
0
__version__ = '0.16'

from usertools import monitor, timing

from ctx_fp import FPContext
from ctx_mp import MPContext
from ctx_iv import MPIntervalContext

fp = FPContext()
mp = MPContext()
iv = MPIntervalContext()

fp._mp = mp
mp._mp = mp
iv._mp = mp
mp._fp = fp
fp._fp = fp
mp._iv = iv
fp._iv = iv
iv._iv = iv

# XXX: extremely bad pickle hack
import ctx_mp as _ctx_mp
_ctx_mp._mpf_module.mpf = mp.mpf
_ctx_mp._mpf_module.mpc = mp.mpc

make_mpf = mp.make_mpf
make_mpc = mp.make_mpc

extraprec = mp.extraprec
extradps = mp.extradps