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

修改 Miller-Rabin 算法 #133

Merged
merged 7 commits into from
Oct 1, 2024
Merged

Conversation

weilycoder
Copy link
Contributor

@weilycoder weilycoder commented Oct 1, 2024

  • 增加对 $2,3$ 倍数和 $<3$ 的数的特判

避免无法正确判断偶数,尽管这个概率可能和 MR 无法判定其他伪素数接近。

#132

Edited:

可能更大的意义是对 $<3$ 的数特判了,因为原来的函数会对小于等于零的数报错。。。

@Mr-Python-in-China Mr-Python-in-China merged commit 03c4316 into luogu-dev:master Oct 1, 2024
@weilycoder weilycoder deleted the dev3 branch October 1, 2024 08:53
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.

2 participants