Skip to content

Bitsintjacobi2 #1

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

Closed
wants to merge 2 commits into from
Closed

Bitsintjacobi2 #1

wants to merge 2 commits into from

Conversation

jlapeyre
Copy link

@jlapeyre jlapeyre commented Jan 3, 2015

Hi, You may be interested in this as well.
This is the jacobi symbol for Int64, Int32, etc. I compared it to the existing code and it is faster in all cases that I tried (very large numbers, small numbers) by as much as a factor of 2. It is much slower than the call to gmp if the input types are allowed to be BigInt.

--John

	modified:   src/Combinatorics.jl
	modified:   test/basic.jl
@jiahao
Copy link
Collaborator

jiahao commented Jan 3, 2015

That code looks nice to have. Much as I would like to accept it, unfortunately the license for this code is not compatible. The code in this PR is GPL since it is explicitly derived from Perl's base library which is GPL, whereas this package is MIT licensed.

Alternatively we can accept a translation from a MIT-license-compatible code base, or reimplement an algorithm from scratch from the primary mathematical literature.

@jiahao jiahao closed this Jan 3, 2015
@jlapeyre
Copy link
Author

jlapeyre commented Jan 4, 2015

The code in the PR is a not in the perl distribution, but it is licensed under either the GPL or Aritistic license, both of which are more restrictive than MIT. There is a good chance that the author would agree to license it under the MIT license. But, the algorithm appears on many web pages. It would take as much effort for someone else to cut and paste it as it would for me to locate the author.

@jlapeyre
Copy link
Author

jlapeyre commented Jan 4, 2015

... or perhaps even cleaner, just read the algorithm and write the code.

logankilpatrick pushed a commit that referenced this pull request Nov 1, 2021
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