Skip to content

Commit

Permalink
fix(nmod): Add nmod_ctx to store is_prime
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarbenjamin committed Aug 21, 2024
1 parent 45ea643 commit c2b1f67
Show file tree
Hide file tree
Showing 3 changed files with 215 additions and 84 deletions.
12 changes: 10 additions & 2 deletions src/flint/types/nmod.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@ from flint.flint_base.flint_base cimport flint_scalar
from flint.flintlib.flint cimport mp_limb_t
from flint.flintlib.nmod cimport nmod_t

cdef int any_as_nmod(mp_limb_t * val, obj, nmod_t mod) except -1
#cdef int any_as_nmod(mp_limb_t * val, obj, nmod_t mod) except -1
cdef nmod_ctx any_as_nmod_ctx(obj)

cdef class nmod_ctx:
cdef nmod_t mod
cdef bint _is_prime

cdef int any_as_nmod(self, mp_limb_t * val, obj) except -1
cdef nmod _new(self, mp_limb_t * val)

cdef class nmod(flint_scalar):
cdef mp_limb_t val
cdef nmod_t mod
cdef nmod_ctx ctx
Loading

0 comments on commit c2b1f67

Please sign in to comment.