Skip to content

Conversation

randombit
Copy link
Owner

We maintain a distinct codepath for the case where min is 0 or 1, since otherwise certain tests which expect stability of this function will break.

If min is > 1, we generate a number in the range min + [0,max-min), which avoids the slow case.

Fixes #3590

We maintain a distinct codepath for the case where min is 0 or 1,
since otherwise certain tests which expect stability of this function
will break.

If min is > 1, we generate a number in the range `min + [0,max-min)`,
which avoids the slow case.

Fixes #3590
@randombit randombit merged commit e16e58a into master Jun 23, 2023
@randombit randombit deleted the jack/fix-3590 branch June 23, 2023 13:09
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.

BigInt::random_integer hangs
1 participant