{"id":19873600,"url":"https://github.com/febeling/miller_rabin","last_synced_at":"2025-03-01T01:20:15.163Z","repository":{"id":1964729,"uuid":"2895404","full_name":"febeling/miller_rabin","owner":"febeling","description":"Erlang module to test for primality of integer numbers","archived":false,"fork":false,"pushed_at":"2011-12-09T21:19:25.000Z","size":91,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-11T16:50:00.851Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/febeling.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-02T01:16:38.000Z","updated_at":"2021-03-10T21:50:32.000Z","dependencies_parsed_at":"2022-09-09T10:41:16.617Z","dependency_job_id":null,"html_url":"https://github.com/febeling/miller_rabin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/febeling%2Fmiller_rabin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/febeling%2Fmiller_rabin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/febeling%2Fmiller_rabin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/febeling%2Fmiller_rabin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/febeling","download_url":"https://codeload.github.com/febeling/miller_rabin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241301442,"owners_count":19940644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T16:19:16.748Z","updated_at":"2025-03-01T01:20:15.119Z","avatar_url":"https://github.com/febeling.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# miller_rabin\n\nAn Erlang module implementing the Miller-Rabin test. This test is a\nprobabilistic test for primality of numbers. It is the alogrithm used\nin Mathematica.\n\nThe module exports three functions that can be used to check for\nprimality:\n\n    is_probable_prime(N)\n\nand\n\n    is_probable_prime(N, K)\n\nThese functions use the original, undeterministic version of the\nalgorithm. That means it can yield true for a number that is\ncomposite, but this is very rare. The first function tests against K =\n20 random bases per default.\n\n    is_prime(N)\n\nThis function uses the deterministic variant of the algorithm. It is\nreliable for numbers N \u003c 341,550,071,728,321. This version uses not\nrandom sets of bases, like the original version, which could yield\nfalse positives. Instead it uses sets which have been shown to not\nyield false positives for the intervals in which the function is\ndefined.\n\n# Example Usage\n\nThis example prints all primes up to 1000.\n\n```erlang\n-module(example).\n\n-import(miller_rabin, [is_prime/1]).\n\n-compile([export_all]).\n\nprimes_below_1000() -\u003e\n    L = lists:seq(1, 1000),\n    lists:map(fun(X) -\u003e\n                      case is_prime(X) of\n                          true  -\u003e io:format(\"~w~n\", [X]);\n                          false -\u003e false\n                      end\n              end,\n              L),\n    ok.\n```\n\n# Links\n\n* http://en.wikipedia.org/wiki/Miller-Rabin_primality_test\n* http://mathworld.wolfram.com/Rabin-MillerStrongPseudoprimeTest.html\n\n# License\n\nMIT. See MIT-LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffebeling%2Fmiller_rabin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffebeling%2Fmiller_rabin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffebeling%2Fmiller_rabin/lists"}