Ticket #3049 (closed defect: invalid)
combinatorics -- lame overflow with Compositions(n).count() (very easy to fix)
| Reported by: | was | Owned by: | mhansen |
|---|---|---|---|
| Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
| Component: | combinatorics | Keywords: | |
| Cc: | sage-combinat | Work issues: | |
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description (last modified by was) (diff)
The following calculation is trivial, so shouldn't overflow:
sage: len(Compositions(30)) 536870912 sage: len(Compositions(40)) Traceback (most recent call last): ... OverflowError: long int too large to convert to int
This is also lame:
sage: len(Partitions(1000)) Traceback (most recent call last): ... OverflowError: long int too large to convert to int
Change History
Note: See
TracTickets for help on using
tickets.

This is also