#11854 closed defect (fixed)
Fix conversion QQ -> PARI
Reported by: | jdemeyer | Owned by: | was |
---|---|---|---|
Priority: | major | Milestone: | sage-4.8 |
Component: | interfaces | Keywords: | |
Cc: | Merged in: | sage-4.8.alpha1 | |
Authors: | Jeroen Demeyer | Reviewers: | William Stein |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #11611, #11685 | Stopgaps: |
Description (last modified by )
Same problem as #11611 but for QQ
instead of ZZ
, the hash of an element depends on previous garbage on the PARI stack. This is because the conversion QQ->PARI is not done properly.
sage: foo = pari(2^(32*1024)); sage: hash(pari(QQ(1))) -8646911284551352313 sage: foo = pari(0xDEADBEEF * (2^(32*1024)-1)//(2^32 - 1)); sage: hash(pari(QQ(1))) -5476377146882523129
Attachments (1)
Change History (13)
comment:1 Changed 8 years ago by
- Dependencies set to #11130
comment:2 Changed 8 years ago by
- Dependencies changed from #11130 to #11130, #11685
comment:3 Changed 8 years ago by
- Status changed from new to needs_review
comment:4 Changed 8 years ago by
- Milestone changed from sage-4.7.2 to sage-4.7.3
comment:5 Changed 8 years ago by
- Dependencies changed from #11130, #11685 to #11685
comment:6 Changed 8 years ago by
- Dependencies changed from #11685 to #11611, #11685
- Description modified (diff)
comment:7 follow-up: ↓ 8 Changed 7 years ago by
- Status changed from needs_review to positive_review
Changed 7 years ago by
comment:8 in reply to: ↑ 7 Changed 7 years ago by
Replying to was:
An English expert may point out that "For internal use only, this directly uses the PARI stack." is a run-on sentence, and should be "For internal use only; this directly uses the PARI stack."
Fixed this.
Many thanks for the review!
comment:9 Changed 7 years ago by
- Reviewers set to William Stein
comment:10 Changed 7 years ago by
- Merged in set to sage-4.7.3.alpha1
- Resolution set to fixed
- Status changed from positive_review to closed
comment:12 Changed 7 years ago by
- Merged in changed from sage-4.7.3.alpha1 to sage-4.8.alpha1
- Milestone set to sage-4.8
Note: See
TracTickets for help on using
tickets.
The code looks excellent and this is an extremely important patch. (An English expert may point out that "For internal use only, this directly uses the PARI stack." is a run-on sentence, and should be "For internal use only; this directly uses the PARI stack.")
Also all tests pass, so positive review.