{"id":17134522,"url":"https://github.com/tiagocavalcante/polynomial-roots","last_synced_at":"2025-04-13T08:55:30.606Z","repository":{"id":47026282,"uuid":"515209995","full_name":"TiagoCavalcante/polynomial-roots","owner":"TiagoCavalcante","description":"Find the real roots of huge polynomials in milliseconds","archived":false,"fork":false,"pushed_at":"2024-01-04T13:47:25.000Z","size":46,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T00:33:58.550Z","etag":null,"topics":["math","polynomials","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/polynomial-roots","language":"Rust","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/TiagoCavalcante.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["TiagoCavalcante"]}},"created_at":"2022-07-18T14:06:02.000Z","updated_at":"2023-12-08T16:56:49.000Z","dependencies_parsed_at":"2023-02-06T09:50:11.548Z","dependency_job_id":null,"html_url":"https://github.com/TiagoCavalcante/polynomial-roots","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/TiagoCavalcante%2Fpolynomial-roots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TiagoCavalcante%2Fpolynomial-roots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TiagoCavalcante%2Fpolynomial-roots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TiagoCavalcante%2Fpolynomial-roots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TiagoCavalcante","download_url":"https://codeload.github.com/TiagoCavalcante/polynomial-roots/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688544,"owners_count":21145763,"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":["math","polynomials","rust"],"created_at":"2024-10-14T19:45:00.775Z","updated_at":"2025-04-13T08:55:30.587Z","avatar_url":"https://github.com/TiagoCavalcante.png","language":"Rust","funding_links":["https://github.com/sponsors/TiagoCavalcante"],"categories":[],"sub_categories":[],"readme":"# polynomial-roots\n\nFind the real roots of huge polynomials in milliseconds\n\n## How to compile?\n\n```sh\ncargo build --release\n```\n\n## How to use?\n\nThe coefficients are in degree-ascending order, that is: $x^0 + x^1 + x^2 + x^3 + \\cdots$  \nThe coefficients are passed space-separated, therefore to solve the polynomial $3 - 9x + x^3$ you need to run the program the following way:\n```sh\n$ cargo install polynomial-roots\n$ polynomial-roots\n3 -9 0 1\n{ -3.154523; 0.33760893; 2.816914; }\n```\n\n(note: don't forget the zero coefficients)\n\n## How it works?\n\nThe roots are found using the linear formula ($\\dfrac{-b}{a}$), the quadratic formula ($\\dfrac{-b \\pm \\sqrt{b^2 - 4 a c}}{2 a}$), or the [false position method](https://en.wikipedia.org/wiki/Regula_falsi) over the [Cauchy's bound](https://en.wikipedia.org/wiki/Geometrical_properties_of_polynomial_roots#Lagrange's_and_Cauchy's_bounds). It can solve polynomials of any degree.\n\n## I'm not getting all the roots, what should I do?\n\nIf you aren't getting all the roots you should modify the constants from the file `src/constants.rs`. You can DECREASE `PARTITION_SIZE` and INCREASE `ITERATIONS`. That will make the program slower, but with the right tweaks it can solve any polynomial.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagocavalcante%2Fpolynomial-roots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiagocavalcante%2Fpolynomial-roots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagocavalcante%2Fpolynomial-roots/lists"}