#20801: bug in documentation for p-adic padded_list function
-----------------------+------------------------------------
Reporter: cremona | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-7.3
Component: padics | Keywords: p-adic precision
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
-----------------------+------------------------------------
If c is a p-adic integer then c.list() returns its p-adic digits starting
at the {{{p^0}}} coefficient, while if c is a p-adic number then c.list()
returns its digits starting at {{{p^v}}} where v is tha valuation. This
is correctly documented. But there is also the method c.padded_list()
which pads with 0s, and the documentation for this explicitly states that
it always starts with the {{{p^0}}} coefficient; however that is not the
case when c's parent is a p-adic field, even if c is integral. Then,
c.padded_list(k) only lists the coefficients from that of {{{p^v}}} up to
that of {{{p^(k-1)}}}.
The reason is that c.padded_list() first calls c.list() but does not use
the start_val=0 option.
--
Ticket URL: <http://trac.sagemath.org/ticket/20801>
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.