{"id":19123727,"url":"https://github.com/cwithmichael/polynomial","last_synced_at":"2026-06-05T17:30:18.708Z","repository":{"id":57529647,"uuid":"116741082","full_name":"cwithmichael/polynomial","owner":"cwithmichael","description":"implements routines for manipulating univariate polynomials over reals (based on Java code)","archived":false,"fork":false,"pushed_at":"2021-01-25T23:03:59.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-03T09:14:34.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/cwithmichael.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}},"created_at":"2018-01-08T23:39:02.000Z","updated_at":"2020-05-10T04:36:46.000Z","dependencies_parsed_at":"2022-08-26T02:42:38.104Z","dependency_job_id":null,"html_url":"https://github.com/cwithmichael/polynomial","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwithmichael%2Fpolynomial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwithmichael%2Fpolynomial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwithmichael%2Fpolynomial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwithmichael%2Fpolynomial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cwithmichael","download_url":"https://codeload.github.com/cwithmichael/polynomial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240181990,"owners_count":19761168,"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-09T05:26:55.816Z","updated_at":"2026-06-05T17:30:18.634Z","avatar_url":"https://github.com/cwithmichael.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# polynomial\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/cwithmichael/polynomial)](https://goreportcard.com/report/github.com/cwithmichael/polynomial)\n\nimplements routines for manipulating univariate polynomials over reals\n\nThis is a rewrite of the Java code from [here](https://www.cs.cmu.edu/~adamchik/15-121/lectures/Linked%20Lists/code/Polynomial.java) in Go\n\n## Example Usage\n```\npackage main\nimport (\n\t\"github.com/cwithmichael/polynomial\"\n\t\"fmt\"\n)\n\nfunc main() {\n\tp := new(polynomial.Polynomial)\n\tp2 := new(polynomial.Polynomial)\n\tp.AddTerm(1, 1)\n\tp.AddTerm(2, 2)\n\tp2.AddTerm(3, 1)\n\tp2.AddTerm(4, 2)\n\tsum, _ := p.Add(p2)\n\tfmt.Printf(\"(%v) + (%v) = %v\\n\", p, p2, sum)\n\n\tp3 := new(polynomial.Polynomial)\n\tp3.AddTerm(3.12, 2)\n\tp3.AddTerm(4, 6)\n\tp3.AddTerm(-5, 4)\n\tdiff, _ := p3.Diff()\n\tfmt.Printf(\"d/dx %v = %v\\n\", p3, diff)\n\n\tres := diff.Evaluate(20)\n\tfmt.Printf(\"f = %v\\n\", diff)\n\tfmt.Printf(\"f(20) = %v\\n\", res)\n}\n\n```\n\n```\ngo run main.go\n(1.00x + 2.00x^2) + (3.00x + 4.00x^2) = 4.00x + 6.00x^2\nd/dx 3.12x^2 - 5.00x^4 + 4.00x^6 = 6.24x - 20.00x^3 + 24.00x^5\nf = 6.24x - 20.00x^3 + 24.00x^5\nf(20) = 7.66401248e+07\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwithmichael%2Fpolynomial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcwithmichael%2Fpolynomial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwithmichael%2Fpolynomial/lists"}