{"id":25098237,"url":"https://github.com/antosser/prime-number-calculator-cpp","last_synced_at":"2025-10-30T01:16:41.312Z","repository":{"id":128802370,"uuid":"392940710","full_name":"Antosser/prime-number-calculator-cpp","owner":"Antosser","description":"Calculate prime numbers at insane speeds","archived":false,"fork":false,"pushed_at":"2022-06-14T17:51:26.000Z","size":50,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-07T18:51:24.850Z","etag":null,"topics":["claculator","cpp","prime","prime-numbers","primes"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Antosser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-05T07:08:11.000Z","updated_at":"2023-04-22T20:43:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6c579c7-e987-4230-baf9-24761719dbf3","html_url":"https://github.com/Antosser/prime-number-calculator-cpp","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antosser%2Fprime-number-calculator-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antosser%2Fprime-number-calculator-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antosser%2Fprime-number-calculator-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Antosser%2Fprime-number-calculator-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Antosser","download_url":"https://codeload.github.com/Antosser/prime-number-calculator-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246752657,"owners_count":20827987,"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":["claculator","cpp","prime","prime-numbers","primes"],"created_at":"2025-02-07T18:30:46.096Z","updated_at":"2025-10-30T01:16:36.263Z","avatar_url":"https://github.com/Antosser.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Antosser's really fast \"Prime Number Calculator\"\n## Usage\n1. Open commandline in the directory containing the executable  \n1. Execute the app with the following syntax:  \n```prime \u003cfilename\u003e (\u003camount\u003e [-log] [-binin] [-binout] [-allout]) || \u003c-todec\u003e || \u003c-tobin\u003e```\n1. Wait for the calculations to end  \n\n## Parameters\n* `-log` - Saves the progress and speed at any time (basically the console output) to \"\u003cfilename\u003e.log.csv\" so it can be futherly opened in Google Sheets or Ms Exel\n* `-binin` - Takes a compressed binary file as input (`{filename}.prime`)\n* `-binout` - Outputs binary compressed file instead of decimal (`{filename}.prime`)\n* `-allout` - Outputs both the compressed binary file and the decimal file\n* `-tobin` - Converts the decimal file to compressed binary\n* `-todec` - Converts the binary file to compressed decimal\n\n## How it works\n```cpp\nstd::vector\u003cint\u003e primes = {}; // Create a vector class\nfor (int i = 2; primes.size() \u003c n; i++) { // Loop until vector's size is n\n  int root = sqrt(i) + 1;\n  for (int ci : primes) { // Loop trough every know prime\n    if (i % ci == 0)\n      goto brk; // Number is not prime\n    if (ci \u003e root)\n      break; // Number is prime\n  }\n  primes.push_back(i);\n  brk:;\n}\n\n// Print primes\nfor (auto i : primes)\n  std::cout \u003c\u003c i \u003c\u003c std::endl;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantosser%2Fprime-number-calculator-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantosser%2Fprime-number-calculator-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantosser%2Fprime-number-calculator-cpp/lists"}