Add Fermat Primality Test#790
Add Fermat Primality Test#790raklaptudirm merged 5 commits intoTheAlgorithms:masterfrom arthurvergacas:Fermat-Primality-Test
Conversation
It seems you've accidentally swapped the implementation and the test file :) The overall comment describing the algorithm (VERY nice doc, by the way) is not "proper" JSdoc => only one leading asterisk. It's generally considered good style to start a comment block (both JSdoc and regular comments) with a single, short sentence. Further down, there were some git hiccups, most likely caused by merge conflicts?
|
Hi there 👋 I have a few suggestions and I'd love to push them directly to the branch in your repo but I don't have access there. Could you add me to your fork? https://github.com/arthurvergacas/Javascript/settings/access > "Add people" |
|
Hi 👋 😄 |
|
All good, thank you! You can take a look at the changes I've done in arthurvergacas@c5e44d4 |
|
Hey @defaude, just wanted to say thank you more time! You helped me a lot, and I am really grateful for that! :) I've commented on the commit, but it's just me thanking you one more time haha. I suppose everything is fine with the pr now. Thank you! :)) |
- Add default number of iterations - Correct "corner cases" to "edge cases" - Make clear which bounds are inclusive and which are exclusive
|
Hello! I changed all the things that you pointed out, and also changed a little the test cases (now it also tests different numbers of iterations, which makes sense and should be there since the beginning - don't know why I didn't do that in the first place). Hope that everything is fine now! But if there is still something to change, don't hesitate to ask! :) |
- Add some explanation and links about Carmichael Numbers - Remove explanation about in-built function Math.random()
|
I forgot to add in the commit message, but I also added some line breaks to the introductory explanation to made it easier to read :) |
Hello!
This is my contribution to the math projects! It's a probabilistic primality test based on Fermat's little theorem.
If there's anything wrong with my pull request, please don't hesitate to comment. I've been struggling a lot with git, since this is one of my first pull requests.
Thank you!