Skip to content

Fix binomial distribution overflow - #1

Merged
jayteest merged 1 commit into
masterfrom
fix-binomial-distribution-overflow-15656
Nov 10, 2026
Merged

jayteest merged 1 commit into
masterfrom
fix-binomial-distribution-overflow-15656

Conversation

@jayteest

Copy link
Copy Markdown
Owner

Fixes the overflow reported in TheAlgorithms/Python#15656.

Replace the factorial-based coefficient calculation, which converts a huge integer to float, with math.comb so the reported 171-trial case returns a finite probability.

This pull request targets jayteest/Python:master and is for the user's fork workflow.

@jayteest
jayteest merged commit cbd3705 into master Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant