#11358: matrix multiplication over ZZ sometimes gives incorrect results
------------------------------+---------------------------------------------
Reporter: tomc | Owner: jason, was
Type: defect | Status: needs_work
Priority: critical | Milestone: sage-4.7.1
Component: linear algebra | Keywords: matrix multiplication,
multi-modular, integers, ZZ
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
------------------------------+---------------------------------------------
Changes (by tomc):
* status: needs_review => needs_work
Comment:
I can't get the patch to apply. When I apply the patch and then do
{{{
sage -b
}}}
I get
{{{
Error converting Pyrex file to C:
------------------------------------------------------------
...
"""
cdef Py_ssize_t i
cdef mod_int p
while True:
p = random_prime(self._u_bound, lbound =self._l_bound)
if p not in self.moduli[:self.n]: return p
^
------------------------------------------------------------
/Users/tomc/sage-4.6.2/devel/sage-test-crt-
fix/sage/ext/multi_modular.pyx:191:35: Cannot convert 'mod_int *' to
Python object
}}}
Also, in the new implementation of _new_random_prime() there is the
possibility of an infinite loop if self.moduli already contains all the
primes between self._lbound and self._ubound. I suggest modifying
_new_random_prime() so that it:
* makes some number of tries (10? 100?) to find a new random prime p in
the range self._lbound < p < self._ubound; and
* if this fails then it increases self_ubound and tries again.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11358#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.