Repository navigation
A binomial at a pole of its denominator is zero - #2212
Merged
Rafael-SOWNet merged 1 commit intoOct 29, 2026
Merged
Conversation
binomial(n, k) with a k that is not whole, where n - k is a negative whole number, was left as written: Γ(n - k + 1) in the denominator has a pole there, and the evaluation gave up on the NaN it computed. The reciprocal gamma is 0 at a pole, so the binomial is 0, as mpmath has it: binomial(1/2, 3/2), binomial(5/2, 7/2) and binomial(3/2 + i, 5/2 + i) are 0. A whole k is not taken here, where binomial(-3, k) is not 0. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2212 +/- ##
=======================================
Coverage 86.57% 86.57%
=======================================
Files 302 302
Lines 67056 67059 +3
Branches 19471 19472 +1
=======================================
+ Hits 58054 58058 +4
+ Misses 4899 4896 -3
- Partials 4103 4105 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Rafael-SOWNet
deleted the
a-binomial-at-a-pole-of-its-denominator-is-zero
branch
October 29, 2026 22:55
This was referenced Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
binomial(n, k)with akthat is not whole, wheren - kis a negative whole number, was left as written.Γ(n - k + 1)in the denominator has a pole there, and the evaluation gave up on theNaNit computed for it. The reciprocal gamma is0at a pole, so the binomial is0, as mpmath has it and as the node's domain condition already allows.A whole
kis not taken by the new case:binomial(-3, k)for a wholektoo large to multiply out is not0, and stays as written."binomial(1/2, 3/2)".ToEntity().Simplify()binomial(1/2, 3/2)0"binomial(1/2, 3/2)".ToEntity().EvalNumerical()CannotEvalException0Found beside #2211 while measuring evaluation for #2195's compiled forms; the entry is #2211's, extended.
Tests:
AtAPoleOfTheDenominatorItIsZero, exactly and numerically, at(1/2, 3/2),(5/2, 7/2),(1/2, 5/2)and(3/2 + i, 5/2 + i). Full suite 17929/0, interactive trio, AOT smoke 67/0, all frameworks build.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura