Ticket #13033 (closed defect: fixed)
Conversion PARI -> RR fails for large exponents
| Reported by: | jdemeyer | Owned by: | was |
|---|---|---|---|
| Priority: | major | Milestone: | sage-5.1 |
| Component: | interfaces | Keywords: | sd40.5 PARI MPFR exponent |
| Cc: | zimmerma, benjaminfjones, was | Work issues: | |
| Report Upstream: | N/A | Reviewers: | William Stein |
| Authors: | Jeroen Demeyer | Merged in: | sage-5.1.beta2 |
| Dependencies: | Stopgaps: |
Description (last modified by jdemeyer) (diff)
sage: a = pari(10^6).erfc() sage: a 3.15934761259943 E-434294481910 sage: a.debug() [&=0000000000f84d10] REAL(lg=3):0400000000000003 (+,expo=-1442695040910):5ffffeb018acb072 9b56c6d11005bdc3 sage: RR(a) 5.64243263573681e124617551
The exponent changed from -434294481910 to 124617551.
Attachments
Change History
comment:4 Changed 12 months ago by was
jdmeyer figured this out -- the issue was "int" versus "long"... a patch will be forthcoming.
comment:5 Changed 12 months ago by jdemeyer
- Keywords PARI MPFR exponent added
- Authors set to Jeroen Demeyer
comment:6 Changed 12 months ago by jdemeyer
- Cc was added
- Status changed from new to needs_review
Passes all long doctests on x86_64, passes all longs tests in sage/rings on ppc32.
comment:7 Changed 12 months ago by was
- Status changed from needs_review to positive_review
This looks really good to me! I've run some tests in some places (sage.math and OS X). I've not tested on 32-bit. I really like how the functions are tested.
comment:10 Changed 12 months ago by jdemeyer
- Status changed from positive_review to closed
- Resolution set to fixed
- Merged in set to sage-5.1.beta2
Note: See
TracTickets for help on using
tickets.


Note that
sage: RealField(10000)('1e-434294481910') == 0 True sage: RealField()('1e-434294481910') == 0 Trueso in your example above, RR(a) should be 0.