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

Use num-bigint in trial_div #8

Merged
merged 1 commit into from
Apr 7, 2024
Merged

Conversation

hesampakdaman
Copy link
Owner

@hesampakdaman hesampakdaman commented Apr 7, 2024

Changes

Although trial division is a very inefficient algorithm to prime factorize an integer, we make the change from u128 -> BigUint to keep consistency inside this crate.

  • Use BigUint inside trial_div
  • Change name of struct Divisor to DivisorCandidates
  • Simplify DivisorCandidates by using into_iter() and using break condition in loop

@hesampakdaman hesampakdaman merged commit 6c86b39 into main Apr 7, 2024
1 check passed
@hesampakdaman hesampakdaman deleted the use-bigint-in-trial-div branch April 7, 2024 11:01
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