Opened 6 years ago
Closed 4 years ago
#20801 closed defect (wontfix)
bug in documentation for p-adic padded_list function
Reported by: | cremona | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | padics | Keywords: | p-adic precision |
Cc: | roed | Merged in: | |
Authors: | Reviewers: | David Roe | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
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.
Change History (6)
comment:1 Changed 5 years ago by
- Cc roed added
comment:2 Changed 4 years ago by
comment:3 Changed 4 years ago by
I'm happy for this to be closed. The code I was writing when I came across this now uses the new expansion() method already.
comment:4 Changed 4 years ago by
- Reviewers set to David Roe
- Status changed from new to needs_review
comment:5 Changed 4 years ago by
- Milestone changed from sage-7.3 to sage-duplicate/invalid/wontfix
- Status changed from needs_review to positive_review
comment:6 Changed 4 years ago by
- Resolution set to wontfix
- Status changed from positive_review to closed
closing positively reviewed duplicates
The documentation of
padded_list
was changed in #14825 so that it now says that it starts atp^v
for field elements. At the same time, this function was deprecated in favor of usingexpansion
.Should this ticket be closed as (now) invalid?