{"id":46270192,"url":"https://github.com/uutils/num-prime","last_synced_at":"2026-03-04T03:04:07.833Z","repository":{"id":57647271,"uuid":"445724311","full_name":"uutils/num-prime","owner":"uutils","description":"Generic and optimized primality test, factorization and various number theoretic functions with arbitrary precision based on `num`.","archived":false,"fork":false,"pushed_at":"2026-02-18T21:34:19.000Z","size":534,"stargazers_count":25,"open_issues_count":20,"forks_count":14,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-02-18T23:49:00.332Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uutils.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-01-08T04:34:57.000Z","updated_at":"2026-02-18T21:34:16.000Z","dependencies_parsed_at":"2024-11-04T07:22:44.604Z","dependency_job_id":"72789bee-f81e-422a-adfc-e612132424dc","html_url":"https://github.com/uutils/num-prime","commit_stats":{"total_commits":88,"total_committers":2,"mean_commits":44.0,"dds":"0.011363636363636354","last_synced_commit":"bdf9d5f9faf58b98289243ae06d46dd3c82aab45"},"previous_names":["uutils/num-prime"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/uutils/num-prime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uutils%2Fnum-prime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uutils%2Fnum-prime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uutils%2Fnum-prime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uutils%2Fnum-prime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uutils","download_url":"https://codeload.github.com/uutils/num-prime/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uutils%2Fnum-prime/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30070479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T01:03:42.280Z","status":"online","status_checked_at":"2026-03-04T02:00:07.464Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-03-04T03:04:04.622Z","updated_at":"2026-03-04T03:04:07.828Z","avatar_url":"https://github.com/uutils.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# num-prime\n\n[![Crates.io](https://img.shields.io/crates/v/num-prime.svg)](https://crates.io/crates/num-prime)\n[![CodSpeed](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/uutils/num-prime?utm_source=badge)\n[![Discord](https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord\u0026longCache=true\u0026style=flat)](https://discord.gg/wQVJbvJ)\n[![License](http://img.shields.io/badge/license-Apache%202-blue.svg)](https://github.com/uutils/num-prime/blob/main/LICENSE)\n[![dependency status](https://deps.rs/repo/github/uutils/num-prime/status.svg)](https://deps.rs/repo/github/uutils/num-prime)\n\n[![CodeCov](https://codecov.io/gh/uutils/num-prime/branch/main/graph/badge.svg)](https://codecov.io/gh/uutils/num-prime)\n\nThis crate provides utilities for prime number related functionalities:\n\n- Primality testing\n  - Deterministic primality check of `u64` integers (using a very fast hashing algorithm)\n  - Fermat probable prime test\n  - Miller-rabin probable prime test\n  - (strong/extra strong) Lucas probable prime test\n  - Baillie-PSW test\n  - Sophie Germain safe prime test\n- Primes generation and indexing\n  - A naive implementation of the sieve of Eratosthenes\n  - Unified API to support other prime generation backends\n  - Generate random (safe) primes\n  - Find previous/next prime\n- Integer factorization\n  - Trial division\n  - Pollard's rho algorithm\n  - Shanks's square forms factorization (SQUFOF)\n  - Fast factorization of `u64` and `u128` integers\n- Number theoretic functions\n  - Prime Pi function (number of primes under limit), its estimation and its bounds\n  - Nth prime, its estimation and its bounds\n  - Moebius function\n  - Divisor Sigma function *([in examples](./examples/divisor_sigma.rs))*\n  - Prime Omega function *([in examples](./examples/prime_omega.rs))*\n\nIt's based on the `num` creates and most functions are decently optimized with pre-computed tables (see **[benchmark results here](./PERFORMANCE.md)**).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuutils%2Fnum-prime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuutils%2Fnum-prime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuutils%2Fnum-prime/lists"}