{"id":13411603,"url":"https://github.com/xxjwxc/gofal","last_synced_at":"2025-07-29T01:08:47.795Z","repository":{"id":57488032,"uuid":"200606021","full_name":"xxjwxc/gofal","owner":"xxjwxc","description":"fractional api base on golang . golang math tools fractional molecular denominator 分数计算 分子 分母 运算","archived":false,"fork":false,"pushed_at":"2019-10-08T03:02:59.000Z","size":41,"stargazers_count":19,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T03:07:30.866Z","etag":null,"topics":["denominator","fractional","math","molecular","operation"],"latest_commit_sha":null,"homepage":"","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/xxjwxc.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":"2019-08-05T07:37:55.000Z","updated_at":"2024-10-30T08:35:55.000Z","dependencies_parsed_at":"2022-08-29T11:22:41.656Z","dependency_job_id":null,"html_url":"https://github.com/xxjwxc/gofal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xxjwxc/gofal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxjwxc%2Fgofal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxjwxc%2Fgofal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxjwxc%2Fgofal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxjwxc%2Fgofal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xxjwxc","download_url":"https://codeload.github.com/xxjwxc/gofal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxjwxc%2Fgofal/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266135686,"owners_count":23881803,"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":["denominator","fractional","math","molecular","operation"],"created_at":"2024-07-30T20:01:14.904Z","updated_at":"2025-07-20T14:04:12.016Z","avatar_url":"https://github.com/xxjwxc.png","language":"Go","funding_links":[],"categories":["Data Structures and Algorithms","Data Structures","数据结构与算法","Generators","数据结构`go语言实现的数据结构与算法`","Uncategorized","Data Integration Frameworks","数据结构"],"sub_categories":["Miscellaneous Data Structures and Algorithms","Advanced Console UIs","Standard CLI","杂项数据结构和算法","标准 CLI"],"readme":"[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go) \n\n# gofal\n\n[中文文档](README_zh_cn.md)\n\n- Fractional Operational Correlation API base on golang\n- Supporting Precision Operations\n- Supporting addition, subtraction, multiplication and division\n- Support chain expression\n- Support result output(flat64)\n\n### Example\n\n\n1、 Add \n\n```go\n\ttmp := fractional.Model(7, 12)\n\ttmp1 := fractional.Model(1, 12)\n\tfmt.Println(tmp.Add(tmp1))\n```\n\n- out\n```sh\n2/3\n```\n\n2、 Subtraction \n\n```go\n\ttmp = fractional.Model(1, 4)\n\ttmp1 = fractional.Model(1, 3)\n\tfmt.Println(tmp.Sub(tmp1))\n```\n\n- out\n```sh\n-1/12\n```\n\n3、Multiplication\n\n```go\n\ttmp = fractional.Model(3, 4)\n\ttmp1 = fractional.Model(2, 3)\n\tfmt.Println(tmp.Mul(tmp1))\n```\n\n- out\n```sh\n1/2\n```\n\n4、 Division\n\n```go\n\ttmp = fractional.Model(3, 4)\n\ttmp1 = fractional.Model(2, 3)\n\tfmt.Println(tmp.Div(tmp1))\n```\n\n- out\n```sh\n9/8\n```\n\n5、 out put (flat64) \n\n```go\n    tmp = fractional.Model(1, 3)\n\tfmt.Println(tmp.Verdict())\n```\n\n- out\n```sh\n0.3333333333333333\n```\n\n6、Chain expression\n\n```go\n\ttmp := fractional.Model(1, 3)\n\ttmp.Add(fractional.Model(1)).Mul(tmp)\n\tfmt.Println(tmp)\n```\n\n- out\n```sh\n16/9\n```\n- All functions can support chain expressions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxjwxc%2Fgofal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxxjwxc%2Fgofal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxjwxc%2Fgofal/lists"}