#9466: square root with all=True should not return ValueError but empty list
-----------------------+----------------------------------------------------
Reporter: mstreng | Owner: AlexGhitza
Type: defect | Status: new
Priority: major | Milestone: sage-5.0
Component: algebra | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------+----------------------------------------------------
{{{
sage: FiniteField(3)(2).sqrt(all = True)
[]
sage: 2.sqrt(extend = False, all = True)
ValueError: square root of 2 not an integer
sage: FiniteField(next_prime(2^100))(2).sqrt(extend = False, all = True)
ValueError: self must be a square
sage: _.<a>=FiniteField(9)
sage: a.sqrt(extend = False, all = True)
ValueError: must be a perfect square.
}}}
At sage days 23 we agreed that square root with all=True should not raise
an error. If no square roots exist, then it should return an empty list.
Right now, it returns an empty list for elements of small prime finite
fields, but raises an error for integers, elements of large prime finite
fields, and elements of non-prime finite fields.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9466>
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.