-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathfmpz.pxd
More file actions
30 lines (20 loc) · 767 Bytes
/
fmpz.pxd
File metadata and controls
30 lines (20 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from cpython.int cimport PyInt_Check, PyInt_AS_LONG
from cpython.long cimport PyLong_Check
from flint.flint_base.flint_base cimport flint_scalar
from flint.utils.conversion cimport chars_from_str
from flint.flintlib.flint cimport slong, pylong_as_slong
from flint.flintlib.flint cimport PyObject
from flint.flintlib.fmpz cimport fmpz_t, fmpz_set_str, fmpz_set_si
from cpython.version cimport PY_MAJOR_VERSION
cdef int fmpz_set_any_ref(fmpz_t x, obj)
cdef fmpz_get_intlong(fmpz_t x)
cdef int fmpz_set_pylong(fmpz_t x, obj)
cdef int fmpz_set_python(fmpz_t x, obj)
cdef any_as_fmpz(obj)
cdef class fmpz(flint_scalar):
"""
The *fmpz* type represents an arbitrary-size integer.
>>> fmpz(3) ** 25
847288609443
"""
cdef fmpz_t val