Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 1541005

Browse files
committed
int64
1 parent 45de1c8 commit 1541005

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sage/matrix/matrix_nmod_dense.pyx

+3-3
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ cdef class Matrix_nmod_dense(Matrix_dense):
767767
k += 1
768768
if zero_divisors_are_pivots:
769769
continue
770-
v[j] = self._modulus.int64/nmod_mat_get_entry(E._matrix, i, j)
770+
v[j] = self._parent._base(mpz_get_si(self._modulus.sageInteger.value)//nmod_mat_get_entry(E._matrix, i, j))
771771
else:
772772
v[j] = one
773773

@@ -783,10 +783,10 @@ cdef class Matrix_nmod_dense(Matrix_dense):
783783
s *= y # now s is divisible by x
784784
for m in range(pivot[l] + 1, j + 1):
785785
v[m] *= y
786-
assert v[j] % self._modulus.int64 != 0
786+
assert v[j] % mpz_get_si(self._modulus.sageInteger.value) != 0
787787
# QUESTION: this is correct modulo N/x, does one need to consider the various lifts?
788788
# FIXME, this feels wrong
789-
v[pivot[l]] = self._parent._base((-s//x))
789+
v[pivot[l]] = self._parent._base(-s//x)
790790
basis.append(v)
791791
# FIXME, this feels wrong
792792
ans = self._new(len(basis), self._ncols)

0 commit comments

Comments
 (0)