Opened 4 years ago

#23827 new enhancement

Improve __getitem__ for p-adic iterators

Reported by: roed Owned by:
Priority: major Milestone: sage-8.1
Component: padics Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


#14825 introduced an iterator for p-adic expansions, which is capable of calculating the nth term in the expansion quickly using division (rather than computing all of the digits up to that point):

sage: R = Zp(5, 1000000)
sage: a = R.random_element()
sage: E = a.expansion()
sage: E[876543]

The same functionality should be available when using a balanced expansion:

sage: E = a.expansion(lift_mode='smallest')
sage: E[876543] # did not terminate

Change History (0)

Note: See TracTickets for help on using tickets.