#4556: [with patch, needs review] nth_root for finite fields: document the fact
that 'extend' is not implemented
------------------------+---------------------------------------------------
Reporter: jhpalmieri | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone: sage-3.2.1
Component: algebra | Keywords: finite field, nth_root
------------------------+---------------------------------------------------
From a discussion on [http://groups.google.com/group/sage-
devel/browse_frm/thread/a01375b02a8a65a0 sage-devel]:
The documentation for the nth_root method for finite fields (repeated
in each of the files sage/structure/element.pyx, sage/rings/
finite_field_element.py, and sage/rings/finite_field_givaro.pyx) says
this:
{{{
INPUT:
n -- integer >= 1 (must fit in C int type)
extend -- bool (default: True); if True, return a square
root in an extension ring, if necessary. Otherwise,
raise a ValueError if the square is not in the base
ring.
all -- bool (default: False); if True, return all square
roots of self, instead of just one.
OUTPUT:
If self has an nth root, returns one (if all == False) or a
list of
all of them (if all == True). Otherwise, raises a ValueError
(if
extend = False) or a NotImplementedError (if extend = True).
}}}
The entirety of the code dealing with 'extend' is this:
{{{
if extend:
raise NotImplementedError
}}}
The non-implementation of the 'extend' option needs to be documented.
I've changed the docstrings to reflect this. Also, "square root" needs to
be changed to "nth root" several times.
(The 'extend' issue also applies to the square_root method in
finite_field_element.py.
The code for the sqrt method in finite_field_givaro.pyx is similar,
but the extend option, while present, isn't documented.)
I'm attaching a patch to deal with these issues.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4556>
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
-~----------~----~----~----~------~----~------~--~---