{"id":15713038,"url":"https://github.com/timothygu/go-math","last_synced_at":"2025-03-30T18:28:44.023Z","repository":{"id":57534666,"uuid":"282774906","full_name":"TimothyGu/go-math","owner":"TimothyGu","description":"Integer math utilities for Go.","archived":false,"fork":false,"pushed_at":"2020-07-28T03:01:01.000Z","size":48,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T20:51:34.943Z","etag":null,"topics":["go","golang","math"],"latest_commit_sha":null,"homepage":"https://go.timothygu.me/math/v2","language":"Go","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/TimothyGu.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}},"created_at":"2020-07-27T02:27:23.000Z","updated_at":"2023-06-13T06:49:03.000Z","dependencies_parsed_at":"2022-09-26T18:21:40.164Z","dependency_job_id":null,"html_url":"https://github.com/TimothyGu/go-math","commit_stats":null,"previous_names":["timothygu/math"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyGu%2Fgo-math","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyGu%2Fgo-math/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyGu%2Fgo-math/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyGu%2Fgo-math/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimothyGu","download_url":"https://codeload.github.com/TimothyGu/go-math/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246361616,"owners_count":20764962,"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":["go","golang","math"],"created_at":"2024-10-03T21:21:04.554Z","updated_at":"2025-03-30T18:28:43.999Z","avatar_url":"https://github.com/TimothyGu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# math\n\nThis package contains a few math utilities that are not found in the builtin\n[math](https://pkg.go.dev/math) package. In particular, things like\n[Min](https://pkg.go.dev/math?tab=doc#Min) and\n[Max](https://pkg.go.dev/math?tab=doc#Max) for integral types, etc.\n\n## Using this package\n\nPackage math is organized in a way there is a subdirectory for each integral\ntype, with near-identical interfaces: `imath` for `int`, `u64math` for\n`uint64`, etc. Some differences do exist depending on the signedness of the\ntype (e.g., `Abs` doesn't make sense for unsigned types).\n\nTo use a package, do the usual:\n```go\nimport \"go.timothygu.me/math/v2/imath\" // or any subdirectory you'd like to use\n```\n\n## Developing this package\n\nAll of the functional code is [generated](https://blog.golang.org/generate) for\ndifferent types – at least until Go gains\n[generics](https://blog.golang.org/generics-next-step). The generator lives in\n`generate/`, and could be triggered using:\n```sh\ngo generate\n```\n\nTo run tests, use the familiar\n```sh\ngo test ./...\n```\nHowever, you could also do\n```sh\nmake test\n```\nwhich would regenerate source files using `go generate` if needed.\n\nFinally, to remove all generated files, do\n```sh\nmake clean\n```\n\n## License\n\nSee LICENSE.md.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothygu%2Fgo-math","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimothygu%2Fgo-math","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothygu%2Fgo-math/lists"}