#9094: is_square and sqrt for polynomials and fraction fields
-------------------------------+--------------------------------------------
   Reporter:  robertwb         |       Owner:  AlexGhitza
       Type:  defect           |      Status:  needs_work
   Priority:  major            |   Milestone:  sage-4.4.4
  Component:  algebra          |    Keywords:            
     Author:  Robert Bradshaw  |    Upstream:  N/A       
   Reviewer:  John Cremona     |      Merged:            
Work_issues:  doctest failure  |  
-------------------------------+--------------------------------------------
Changes (by newvalueoldvalue):

  * status:  needs_review => needs_work
  * reviewer:  => John Cremona
  * work_issues:  => doctest failure
  * author:  => Robert Bradshaw


Comment:

 Looks good (and useful).  Patch applies fine to 4.4.3.  I tested all
 sage/rings and had one failure (in a new doctest, on 64-bit ubuntu):
 {{{
 File "/storage/jec/sage-4.4.3/devel/sage-
 tests/sage/rings/polynomial/polynomial_element.pyx", line 1262:
     sage: (9 * f^10 * g^4).sqrt() == 3 * f^5 * g^2
 Expected:
     True
 Got:
     False
 }}}
 I have never been happy about doctests using random elements, however
 deterministic they are supposed to be.

 I would have tested for self==0 at the start of the sqrt function, but
 that case will be caught quickly anyway, so no problem.

 I have been working on a patch to add both all= and extend= parameters to
 the sqrt function for AA and QQbar, having found how awkward it is when
 the parameters are not uniform across types.  Would it be worth adding an
 extend= parameter here, even if a NotImplementedError is raised when it is
 needed (i.e. for sqrt of a non-square when extend=True)?

 So: needs work because of the doctest failure;  up to you whether to do
 the extend= thing.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9094#comment:2>
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.

Reply via email to