PageRenderTime 14ms CodeModel.GetById 12ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 1ms

/test/test_misc.txt

http://gmpy.googlecode.com/
Plain Text | 22 lines | 21 code | 1 blank | 0 comment | 0 complexity | 1f21c0a4cb64e131f01a1e91bbd8a8e4 MD5 | raw file
 1Miscellaneous Functions
 2-----------------------
 3
 4    >>> import gmpy2
 5    >>> gmpy2.version()
 6    '2.1.0a0'
 7    >>> gmpy2.mp_limbsize() in (32,64)
 8    True
 9    >>> gmpy2.mp_version().split()[0] in ['GMP', 'MPIR']
10    True
11    >>> check_gmp = gmpy2.mp_version().startswith('GMP') and '5.0.0' <= gmpy2.mp_version().split()[1]
12    >>> check_mpir = gmpy2.mp_version().startswith('MPIR') and '2.4.0' <= gmpy2.mp_version().split()[1]
13    >>> check_gmp or check_mpir
14    True
15    >>> gmpy2.mpfr_version() and gmpy2.mpfr_version().startswith('MPFR')
16    True
17    >>> gmpy2.mpfr_version() and '3.1.0' <= gmpy2.mpfr_version().split()[1]
18    True
19    >>> gmpy2.mpc_version() and gmpy2.mpc_version().startswith('MPC')
20    True
21    >>> gmpy2.mpc_version() and '1.0' <= gmpy2.mpc_version().split()[1]
22    True