#5204: [with second patch, with review] simon_two_descent -- bug in the 
interface
when number field has variable name 'x'
---------------------------+------------------------------------------------
 Reporter:  was            |        Owner:  was       
     Type:  defect         |       Status:  new       
 Priority:  major          |    Milestone:  sage-3.4.1
Component:  number theory  |   Resolution:            
 Keywords:                 |  
---------------------------+------------------------------------------------
Changes (by cremona):

  * summary:  [with patch, needs review] simon_two_descent -- bug in the
              interface when number field has variable name
              'x' => [with second patch, with review]
              simon_two_descent -- bug in the interface when
              number field has variable name 'x'

Comment:

 Review:  I can only deduce that rlm did not actually test this!
 {{{
 sage -t  "devel/sage-5204/sage/schemes/elliptic_curves/gp_simon.py"
 **********************************************************************
 File
 
"/home/john/sage-3.3.rc0/devel/sage-5204/sage/schemes/elliptic_curves/gp_simon.py",
 line 54:
     sage: sage.schemes.elliptic_curves.gp_simon.simon_two_descent(E)
 Exception raised:
     Traceback (most recent call last):
       File "/home/john/sage-3.3.rc0/local/bin/ncadoctest.py", line 1231,
 in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File "/home/john/sage-3.3.rc0/local/bin/sagedoctest.py", line 38, in
 run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/home/john/sage-3.3.rc0/local/bin/ncadoctest.py", line 1172,
 in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_2[4]>", line 1, in <module>
         sage.schemes.elliptic_curves.gp_simon.simon_two_descent(E)###line
 54:
     sage: sage.schemes.elliptic_curves.gp_simon.simon_two_descent(E)
       File "/home/john/sage-3.3.rc0/local/lib/python2.5/site-
 packages/sage/schemes/elliptic_curves/gp_simon.py", line 69, in
 simon_two_descent
         K = E.base_ring().change_names('a')
     AttributeError: 'RationalField' object has no attribute 'change_names'
 **********************************************************************
 File
 
"/home/john/sage-3.3.rc0/devel/sage-5204/sage/schemes/elliptic_curves/gp_simon.py",
 line 56:
     sage: E.simon_two_descent()
 Exception raised:
     Traceback (most recent call last):
       File "/home/john/sage-3.3.rc0/local/bin/ncadoctest.py", line 1231,
 in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File "/home/john/sage-3.3.rc0/local/bin/sagedoctest.py", line 38, in
 run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/home/john/sage-3.3.rc0/local/bin/ncadoctest.py", line 1172,
 in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_2[5]>", line 1, in <module>
         E.simon_two_descent()###line 56:
     sage: E.simon_two_descent()
       File "/home/john/sage-3.3.rc0/local/lib/python2.5/site-
 packages/sage/schemes/elliptic_curves/ell_rational_field.py", line 1202,
 in simon_two_descent
         maxprob=maxprob, limbigprime=limbigprime)
       File "/home/john/sage-3.3.rc0/local/lib/python2.5/site-
 packages/sage/schemes/elliptic_curves/gp_simon.py", line 69, in
 simon_two_descent
         K = E.base_ring().change_names('a')
     AttributeError: 'RationalField' object has no attribute 'change_names'
 **********************************************************************
 1 items had failures:
    2 of   8 in __main__.example_2
 }}}

 I have added a second patch (apply after the first one) which checks that
 K is not QQ before changing names!

 If either rlm or was could review my patch then this can go forward.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5204#comment:2>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to