Ticket #7836 (closed defect: fixed)
Clean up the CRT_* functions
| Reported by: | mhansen | Owned by: | AlexGhitza |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-4.3.1 |
| Component: | basic arithmetic | Keywords: | |
| Cc: | cremona, rlm | Work issues: | |
| Report Upstream: | N/A | Reviewers: | Robert Miller |
| Authors: | John Cremona | Merged in: | sage-4.3.1.alpha2 |
| Dependencies: | Stopgaps: |
Description (last modified by mhansen) (diff)
From #7595:
> I have some problems with the CRT* functions though. > > 1. CRT_list does not check that the two lists have the same length; if the moduli list is shorter you get an IndexError, but it would be better to catch that and raise a more informative error. > > 2. CRT_basis is rather silly. It calls CRT_list n times with the same moduli, which must be wasteful. It would be better to call plain CRT n times with suitable moduli (exercise for the reader). > > Of course, I don't think that these issues should delay the current patch, but deserve a ticket of their own to make sure they are tided up.
Attachments
Change History
Changed 3 years ago by cremona
-
attachment
trac_7836-CRT.patch
added
Applies to 4.3 + patches at #7595
comment:2 Changed 3 years ago by cremona
- Cc rlm added
- Priority changed from major to minor
- Status changed from new to needs_review
- Authors set to John Cremona
The attached patch is based on 4.3 + the patches at #7595. I tested all files which use either CRT_list or CRT_basis.
comment:3 Changed 3 years ago by rlm
- Status changed from needs_review to positive_review
- Reviewers set to Robert Miller
I've tested in sage/rings, and the changes look good to me.
Note: See
TracTickets for help on using
tickets.
