Opened 10 years ago
Closed 10 years ago
#8651 closed defect (fixed)
binomial(n,k) evaluates to zero when 0 is subsituted for k
Reported by: | rhinton | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-4.4.4 |
Component: | symbolics | Keywords: | pynac, binomial |
Cc: | jason | Merged in: | sage-4.4.4.alpha0 |
Authors: | Burcin Erocal, Jens Vollinga | Reviewers: | Mike Hansen |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
We all know binomial(n,0) should be 1. But we're not getting that answer in the following case.
sage: var('n, k') (n, k) sage: binomial(n, 0) # this is OK 1 sage: binomial(n, k).subs(k=0) # this is a problem! 0
Attachments (1)
Change History (7)
comment:1 Changed 10 years ago by
- Keywords pynac added; symbolic removed
comment:2 Changed 10 years ago by
- Cc jason added
comment:3 Changed 10 years ago by
I uploaded a patch with the doctest, new pynac package with the fix coming soon.
comment:4 Changed 10 years ago by
- Status changed from new to needs_review
comment:5 Changed 10 years ago by
- Reviewers set to Mike Hansen
- Status changed from needs_review to positive_review
Looks good to me. This can be merged now.
comment:6 Changed 10 years ago by
- Merged in set to sage-4.4.4.alpha0
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Good catch! I recall this being fixed in
GiNaC
recently. I'll import the relevant patch into pynac and make an updated package.