#16803: Reimplement matrix_integer_dense using FLINT
-------------------------+-------------------------------------------------
Reporter: | Owner:
mmasdeu | Status: needs_review
Type: | Milestone: sage-6.4
enhancement | Resolution:
Priority: major | Merged in:
Component: | Reviewers: William Stein
linear algebra | Work issues:
Keywords: | Commit:
flint, matrix | fcb36b1e57fc645c0372617711b2a9ec0423b77f
Authors: Marc | Stopgaps:
Masdeu |
Report Upstream: N/A |
Branch: |
u/mmasdeu/16803-2 |
Dependencies: |
-------------------------+-------------------------------------------------
Changes (by mmasdeu):
* status: needs_work => needs_review
* commit: 0c75c2ba9475a2eb02807387375b88140d1137c3 =>
fcb36b1e57fc645c0372617711b2a9ec0423b77f
* branch: u/jdemeyer/ticket/16803 => u/mmasdeu/16803-2
Comment:
I have fixed this by changing the code of
sage.structure.element.Matrix.__div__, which was assuming that the
_matrix_times_matrix method of matrix.matrix_integer_dense would know how
to deal with matrices over the rationals. This is a low-level private
function which doesn't do type checking, which I think is the right thing
to do.
What the current patch does is, when writing something like A/B for
matrices A and B, to take the denominator out of ~B, multiply and then put
it back. I have run make ptest and all passed '''except''' for some that
have nothing to do with matrices, for example this one:
{{{
sage -t src/sage/rings/integer.pyx
**********************************************************************
File "src/sage/rings/integer.pyx", line 1954, in
sage.rings.integer.Integer.__pow__
Failed example:
2^(2^63-2)
Expected:
Traceback (most recent call last):
...
MemoryError: failed to allocate 1152921504606847008 bytes
Got:
Fatal Python error: Insufficient memory
Traceback (most recent call last):
File "/usr/local/sage/sage-6.3.beta6/local/lib/python2.7/site-
packages/sage/doctest/forker.py", line 480, in _run
self.execute(example, compiled, test.globs)
File "/usr/local/sage/sage-6.3.beta6/local/lib/python2.7/site-
packages/sage/doctest/forker.py", line 839, in execute
exec compiled in globs
File "<doctest sage.rings.integer.Integer.__pow__[27]>", line 1, in
<module>
Integer(2)**(Integer(2)**Integer(63)-Integer(2))
File "integer.pyx", line 1999, in sage.rings.integer.Integer.__pow__
(build/cythonized/sage/rings/integer.c:14710)
File "c_lib.pyx", line 85, in sage.ext.c_lib.sig_raise_exception
(build/cythonized/sage/ext/c_lib.c:1040)
RuntimeError: Aborted
**********************************************************************
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/16803#comment:47>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.