Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overflow when computing coefficient * weight #637

Open
mdbenito opened this issue Jan 16, 2025 · 0 comments
Open

Overflow when computing coefficient * weight #637

mdbenito opened this issue Jan 16, 2025 · 0 comments
Assignees

Comments

@mdbenito
Copy link
Collaborator

math.comb(n, k) * (1/2**(n-1)) can raise an OverflowError pretty quick inside the coefficient_fun() built in EvaluationStrategy, but math.comb(n, k) / 2**(n-1) won't. We probably need to return a callable in the coefficient, or hardcode the division instead of the multiplication 🙈

@mdbenito mdbenito self-assigned this Jan 16, 2025
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

No branches or pull requests

1 participant