-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added the Number
gcd_factors(n, [a,b,c,...])
method.
Given a positive integer and an array of integers, it tries to find non-trivial factors of n, checking each `gcd(n, array[0])`, `gcd(n, array[1])`, etc. var n = 43*43*97*503 var a = [19*43*97, 1, 13*41*43*101] gcd_factors(n, a) #=> [43, 43, 97, 503] The product of the factors gives back C<n>. However, some factors may be composite.
- Loading branch information
Showing
4 changed files
with
67 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters