#7947: iteration error in QuadraticForm.vectors_by_length()
-------------------------------+--------------------------------------------
Reporter: tornaria | Owner: tornaria
Type: defect | Status: new
Priority: major | Milestone: sage-4.3.1
Component: quadratic forms | Keywords:
Work_issues: | Author:
Upstream: N/A | Reviewer:
Merged: |
-------------------------------+--------------------------------------------
After the fix in #7100 (rounding issues), there's still a bug in {{{the
vectors_by_length()}}} code:
{{{
----------------------------------------------------------------------
| Sage Version 4.3, Release Date: 2009-12-24 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: Q = QuadraticForm(ZZ, 4, [1,-1,-1,-1, 1,0,0, 4,-3, 4])
sage: Q.vectors_by_length(3)
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
/home/tornaria/.sage/temp/sage/9609/_home_tornaria__sage_init_sage_0.py in
<module>()
/home/tornaria/sage/sage-4.3/local/lib/python2.6/site-
packages/sage/quadratic_forms/quadratic_form__split_local_covering.pyc in
vectors_by_length(self, bound)
213 ## Now go back and compute the bounds...
214 ## 2. Compute bounds
--> 215 Z = (T[i] / Q[i][i]).sqrt(extend=False)
216 L[i] = ( Z - U[i]).floor()
217 x[i] = (-Z - U[i]).ceil()
/home/tornaria/sage/sage-4.3/local/lib/python2.6/site-
packages/sage/rings/real_double.so in
sage.rings.real_double.RealDoubleElement.sqrt
(sage/rings/real_double.c:10382)()
ValueError: negative number -0.888887555556 does not have a square root in
the real field
}}}
You can tell this is not a rounding issue from the error message.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7947>
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.