{"id":20635814,"url":"https://github.com/orsinium-labs/tinymath","last_synced_at":"2026-04-29T10:02:13.604Z","repository":{"id":240387398,"uuid":"802075547","full_name":"orsinium-labs/tinymath","owner":"orsinium-labs","description":"📐 The fastest and smallest Go math library for constrained environments, like microcontrollers or WebAssembly.","archived":false,"fork":false,"pushed_at":"2025-08-12T19:12:20.000Z","size":80,"stargazers_count":83,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-12T21:18:29.976Z","etag":null,"topics":["embedded","gamedev","go","golang","math","tinygo","trigonometry","wasm","webassembly"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/orsinium-labs/tinymath","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/orsinium-labs.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":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-17T13:26:45.000Z","updated_at":"2025-08-12T19:12:24.000Z","dependencies_parsed_at":"2024-05-18T14:28:10.991Z","dependency_job_id":"8bf37ee5-e752-4a59-ab44-13c28aee1c43","html_url":"https://github.com/orsinium-labs/tinymath","commit_stats":null,"previous_names":["orsinium-labs/tinymath"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/orsinium-labs/tinymath","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Ftinymath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Ftinymath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Ftinymath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Ftinymath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orsinium-labs","download_url":"https://codeload.github.com/orsinium-labs/tinymath/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Ftinymath/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32420356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["embedded","gamedev","go","golang","math","tinygo","trigonometry","wasm","webassembly"],"created_at":"2024-11-16T15:07:37.579Z","updated_at":"2026-04-29T10:02:13.576Z","avatar_url":"https://github.com/orsinium-labs.png","language":"Go","funding_links":[],"categories":["Embedded Systems"],"sub_categories":["General use"],"readme":"# 🧮 tinymath\n\n[ [📚 docs](https://pkg.go.dev/github.com/orsinium-labs/tinymath) ] [ [🐙 github](https://github.com/orsinium-labs/tinymath) ]\n\nThe fastest Go math library for constrained environments, like microcontrollers or WebAssembly.\n\n* Optimizes for performance and small code size at the cost of precision.\n* Uses float32 because most microcontrollers (like [ESP32](https://en.wikipedia.org/wiki/ESP32)) have much faster computation for float32 than for float64.\n* Designed and tested to work with both Go and [TinyGo](https://tinygo.org/), hence the name.\n* Most algorithms are ported from [micromath](https://github.com/tarcieri/micromath) Rust library.\n* Zero dependency.\n\n## 📦 Installation\n\n```bash\ngo get github.com/orsinium-labs/tinymath\n```\n\n## 🔧 Usage\n\n```go\nfmt.Println(tinymath.Sin(tinymath.Pi))\n```\n\n## 🔬 Size\n\nHere is a comparison of WebAssembly binary size (built with TinyGo) when using tinymath vs stdlib math:\n\n| function     | tinymath | stdlib | ratio |\n| ------------ | --------:| ------:| -----:|\n| atan         |      106 |    367 |   28% |\n| atan2        |      167 |    782 |   21% |\n| exp          |      463 |   2722 |   17% |\n| fract        |      166 |    154 |  107% |\n| hypot        |       67 |    203 |   33% |\n| ln           |      196 |   4892 |    4% |\n| powf         |      701 |   9167 |    7% |\n| round        |      129 |    171 |   75% |\n| sin          |      125 |   1237 |   10% |\n| sqrt         |       57 |     57 |  100% |\n| tan          |      138 |   1137 |   12% |\n| trunc        |       57 |     57 |  100% |\n\nTo reproduce: `python3 size_bench.py`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forsinium-labs%2Ftinymath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forsinium-labs%2Ftinymath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forsinium-labs%2Ftinymath/lists"}