Number-Theory-Python
Number-Theory-Python copied to clipboard
adds Euler Criterion method
Hi,
I made a small contribution by adding Euler's Criterion
Thanks - Give me a day or so to look at the code and then figure out how to merge it.
Rob Campbell
On Jan 17, 2018, at 8:37 AM, Ege Alpay [email protected] wrote:
Hi,
I made a small contribution by adding Euler's Criterion
You can view, comment on, or merge this pull request online at:
https://github.com/Robert-Campbell-256/Number-Theory-Python/pull/1 https://github.com/Robert-Campbell-256/Number-Theory-Python/pull/1 Commit Summary
adds Euler Criterion method File Changes
M Readme.md https://github.com/Robert-Campbell-256/Number-Theory-Python/pull/1/files#diff-0 (1) M numbthy.py https://github.com/Robert-Campbell-256/Number-Theory-Python/pull/1/files#diff-1 (448) Patch Links:
https://github.com/Robert-Campbell-256/Number-Theory-Python/pull/1.patch https://github.com/Robert-Campbell-256/Number-Theory-Python/pull/1.patch https://github.com/Robert-Campbell-256/Number-Theory-Python/pull/1.diff https://github.com/Robert-Campbell-256/Number-Theory-Python/pull/1.diff — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Robert-Campbell-256/Number-Theory-Python/pull/1, or mute the thread https://github.com/notifications/unsubscribe-auth/APw8njcq2Fy-zHUxDKdwu1QjoKtGzfFeks5tLfeIgaJpZM4RhWfn.
Ege,
OK - Only one issue. When you worked with the code your editor made a number of minor changes - mostly just changing the number of leading spaces to indent, as well as some other formatting changes. Unfortunately this is flagged by diff as though most of the file was changed - not just a few lines - and makes it harder to check the changes.
Could I ask you to pull a fresh copy of the file and add your changes to it without changing the formatting?
Rob Campbell
Will add this Euler Criterion function without adding new empty line and spaces in a new PR.
https://github.com/Robert-Campbell-256/Number-Theory-Python/pull/5
OK - Give me a day or so to look at the code and accept the pull.
Looks good. I'll merge it today, although I will then come back and make the change "a ** ((p - 1) / 2) % p" --> "pow(a,(p-1)/2,p)" to ensure that fast exponentiation is used.
I feel a little bad, because this is essentially the same reasonable addition that egealpay recommended last year. I wish there was a way to give him joint credit for the pull. (Sigh ... had I been more energetic then I could have just accepted it and then re-edited to fix the minor formatting issues. Live and learn.)
Or, well, "a ** ((p - 1) / 2) % p" --> "pow(a,(p-1)//2,p)" actually. (Duh, Python 3 ...)
Man, don't be that sad. It's important things are moving on. I was also a part time learner who is somehow has some interests on numbers. It' not important who is got merged. Thanks for your sharing. I like the document and the code you write.