Opened 10 years ago
Closed 10 years ago
#10873 closed defect (fixed)
Bug in integer_mod powering non-invertible base and negative exponents
Reported by: | robertwb | Owned by: | AlexGhitza |
---|---|---|---|
Priority: | major | Milestone: | sage-4.7.1 |
Component: | basic arithmetic | Keywords: | |
Cc: | kcrisman | Merged in: | sage-4.7.1.alpha4 |
Authors: | Robert Bradshaw | Reviewers: | Mariah Lenox |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
In sage-4.7::
sage: mod(2, 990)^-1 --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) /usr/local/src/sage-4.7/<ipython console> in <module>() /usr/local/src/sage-4.7/local/lib/python2.6/site-packages/sage/rings/finite_rings/integer_mod.so in sage.rings.finite_rings.integer_mod.IntegerMod_int.__pow__ (sage/rings/finite_rings/integer_mod.c:20093)() RuntimeError: Floating point exception
Attachments (2)
Change History (13)
Changed 10 years ago by
comment:1 Changed 10 years ago by
- Status changed from new to needs_review
comment:2 Changed 10 years ago by
- Cc kcrisman added
comment:3 Changed 10 years ago by
- Status changed from needs_review to needs_work
comment:4 Changed 10 years ago by
- Status changed from needs_work to needs_review
FIxed _sig_on -> sig_on() conflict.
comment:5 Changed 10 years ago by
- Status changed from needs_review to needs_work
patch 10873-mod-pow-rebased.patch applied to sage-4.7.1.alpha1, then did 'make testlong'. Got the following error:
sage -t -long -force_lib "devel/sage/sage/rings/finite_rings/integer_mod.pyx" ESC[?1034h********************************************************************** File "/home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-review-10873/devel/sage/sage/rings/finite_rings/integer_mod.pyx", iled example: sig_on_count() Expected: 0 Got: 1 ********************************************************************** File "/home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-review-10873/devel/sage/sage/rings/finite_rings/integer_mod.pyx", iled example: sig_on_count() Expected: 0 Got: 1 ********************************************************************** File "/home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-core2-fc-review-10873/devel/sage/sage/rings/finite_rings/integer_mod.pyx", iled example: sig_on_count() Expected: 0 Got: 1 **********************************************************************
etc.
comment:6 follow-up: ↓ 7 Changed 10 years ago by
How long ago was this? (I posted an updated version of the patch when I saw these errors on the patchbot, maybe you grabbed the old one?)
comment:7 in reply to: ↑ 6 Changed 10 years ago by
comment:8 Changed 10 years ago by
- Status changed from needs_work to needs_review
No problem, I'm just glad you're taking the time to look at my tickets :).
comment:9 Changed 10 years ago by
- Reviewers set to Mariah Lenox
- Status changed from needs_review to positive_review
Applied patch, did 'sage -b', then 'make testlong'. All tests passed. Positive review!
comment:10 Changed 10 years ago by
- Description modified (diff)
comment:11 Changed 10 years ago by
- Merged in set to sage-4.7.1.alpha4
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
The patch fails to apply to sage-4.7.rc2: