Ticket #2598 (closed enhancement: fixed)
[with patch, positive review] allow ZZ element to be constructed from GF(2) list
| Reported by: | malb | Owned by: | somebody |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-2.11 |
| Component: | basic arithmetic | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description (last modified by mabshoff) (diff)
This works for some time now:
sage: ZZ([1,0], 2) 1
and after the patch this also works:
sage: ZZ([GF(2)(1),GF(2)(0)], 2) 1
It is -- at least for my applications -- common to get a list of bits, do some bitstuff with them and combine them again to an integer.
Attachments
Change History
comment:2 Changed 5 years ago by jbmohler
- Summary changed from [with patch, needs review] allow ZZ element to be constructed from GF(2) list to [with patch, positive review] allow ZZ element to be constructed from GF(2) list
The patch does what it claims and adds an appropriate doc-test. There is a small (maybe 7-8%) speed-hit, but I think it is worth it for the improved functionality.
I say it should be applied.
Note: See
TracTickets for help on using
tickets.

