{"id":19589173,"url":"https://github.com/fasttime/q-exact","last_synced_at":"2026-06-11T06:31:19.963Z","repository":{"id":24926831,"uuid":"28343958","full_name":"fasttime/Q-exact","owner":"fasttime","description":"A library for exact calculations with rational numbers","archived":false,"fork":false,"pushed_at":"2019-04-24T04:24:06.000Z","size":158,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T23:36:25.151Z","etag":null,"topics":["arithmetic","exact","math","q","rational"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fasttime.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-22T15:23:00.000Z","updated_at":"2018-12-29T12:00:26.000Z","dependencies_parsed_at":"2022-08-23T06:31:30.139Z","dependency_job_id":null,"html_url":"https://github.com/fasttime/Q-exact","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasttime%2FQ-exact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasttime%2FQ-exact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasttime%2FQ-exact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fasttime%2FQ-exact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fasttime","download_url":"https://codeload.github.com/fasttime/Q-exact/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240860165,"owners_count":19869286,"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":["arithmetic","exact","math","q","rational"],"created_at":"2024-11-11T08:17:31.159Z","updated_at":"2026-06-11T06:31:19.933Z","avatar_url":"https://github.com/fasttime.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Q-exact\n=======\n\nA library to make exact calculations with [rational numbers](http://mathworld.wolfram.com/RationalNumber.html) without rounding errors.\n\nCompare this:\n\n`1 / 49 * 49` ▶ `0.9999999999999999`\n\nwith this:\n\n`Q(1).over(49).times(49)` ▶ `1`\n\nQ-exact overcomes some of the classic limitations of [floating-point arithmetic](http://mathworld.wolfram.com/Floating-PointArithmetic.html) by requiring that all results be expressed exactly, or not at all.\nRational numbers in Q-exact are stored as products of prime factors.\nFor example, **-75/28** is represented as **-2\u003csup\u003e-2\u003c/sup\u003e⋅3⋅5\u003csup\u003e2\u003c/sup\u003e⋅7\u003csup\u003e-1\u003c/sup\u003e**.\nThere is no way to represent [irrational numbers](http://mathworld.wolfram.com/IrrationalNumber.html), `Infinity` or `NaN`.\n\nSee the [**Q Class Reference**](Q-exact.md) for further informations.\n\n*This is a preliminary documentation and may be subject to change at any time.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffasttime%2Fq-exact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffasttime%2Fq-exact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffasttime%2Fq-exact/lists"}