Bitsintjacobi2#1
Conversation
modified: src/Combinatorics.jl modified: test/basic.jl
Conflicts: test/basic.jl
|
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. |
|
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. |
|
... or perhaps even cleaner, just read the algorithm and write the code. |
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