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

Jacobi facelifting #103

Merged
merged 8 commits into from
Apr 18, 2018
Merged

Jacobi facelifting #103

merged 8 commits into from
Apr 18, 2018

Conversation

Bodigrim
Copy link
Owner

@Bodigrim Bodigrim commented Apr 8, 2018

This is an attempt to facelift Math.NumberTheory.Moduli.Jacobi.

  1. There were two functions jacobi and jacobi', where the first one checked preconditions on arguments and the second one did not. I assume jacobi' was supposed to be "faster", but it is unsafe to use and clutters API. I have written benchmarks and it appeared that performance of both functions is actually pretty much the same. So I've removed jacobi'.

  2. As a part of Support Natural on the same level with Int, Word and Integer #100 I've added specialised versions of jacobi on Natural.

  3. As a part of Migrate from array to vector #79 I tried to refactor jac2 using Vector. But, taking closer look, it appeared that the code can be clarified, eliminating any need in either Array or Vector, using only simple bit tests.

  4. Elaborate comments with links to wiki and examples.

@Bodigrim Bodigrim merged commit 4602ebe into Bodigrim:master Apr 18, 2018
@Bodigrim Bodigrim deleted the jacobi branch April 18, 2018 17:52
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