#20408: BinaryQF solve_integer can crash
-----------------------------+----------------------------
   Reporter:  Eric119        |            Owner:
       Type:  defect         |           Status:  new
   Priority:  major          |        Milestone:  sage-7.2
  Component:  number theory  |         Keywords:
  Merged in:                 |          Authors:
  Reviewers:                 |  Report Upstream:  N/A
Work issues:                 |           Branch:
     Commit:                 |     Dependencies:
   Stopgaps:                 |
-----------------------------+----------------------------
 This was observed on !SageMathCloud cloud.sagemath.com, on April 9, 2016.
 The solve_integer method of BinaryQF crashes in some cases. For instance,

 {{{
 BinaryQF([1, 0, 4]).solve_integer(10)
 }}}

 produces the error report

 {{{
 Error in lines 1-1
 Traceback (most recent call last):
   File "/projects/sage/sage-6.10/local/lib/python2.7/site-
 packages/smc_sagews/sage_server.py", line 904, in execute
     exec compile(block+'\n', '', 'single') in namespace, locals
   File "", line 1, in <module>
   File "/projects/sage/sage-6.10/local/lib/python2.7/site-
 packages/sage/quadratic_forms/binary_qf.py", line 731, in solve_integer
     for z in z2.sqrt(extend=False, all=True):
   File "sage/rings/integer.pyx", line 5632, in
 sage.rings.integer.Integer.sqrt
 (/projects/sage/sage-6.10/src/build/cythonized/sage/rings/integer.c:35328)
     raise ValueError, "square root of negative number not an integer"
   ValueError: square root of negative number not an integer
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/20408>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to