{"id":23747720,"url":"https://github.com/nirvanasupermind/large-number","last_synced_at":"2026-05-09T16:39:53.008Z","repository":{"id":129732444,"uuid":"279002674","full_name":"nirvanasupermind/large-number","owner":"nirvanasupermind","description":"Javascript library capable of storing and performing operators with very large numbers up to 10^10^308","archived":false,"fork":false,"pushed_at":"2020-07-29T00:18:21.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-11T13:36:09.870Z","etag":null,"topics":["javascript","large-numbers"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/nirvanasupermind.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":"2020-07-12T06:03:36.000Z","updated_at":"2021-01-12T01:37:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ac29367-ee77-4194-88f5-d037647bf4b2","html_url":"https://github.com/nirvanasupermind/large-number","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nirvanasupermind/large-number","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanasupermind%2Flarge-number","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanasupermind%2Flarge-number/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanasupermind%2Flarge-number/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanasupermind%2Flarge-number/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nirvanasupermind","download_url":"https://codeload.github.com/nirvanasupermind/large-number/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanasupermind%2Flarge-number/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273381915,"owners_count":25095330,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["javascript","large-numbers"],"created_at":"2024-12-31T14:55:55.015Z","updated_at":"2025-10-10T09:43:06.696Z","avatar_url":"https://github.com/nirvanasupermind.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# large-number v1.0\nNumerical Javascript library (ES5 compatible) representing numbers as large as `1e1.8e308` and down to `1e-1.8e308` in the scientific notation.  The `LargeNumber` class provides methods for many operators, and conversion to JS `Number`s. Note that LargeNumber isn't necessarily arbitrary-precision.\n\n## Installation and usage\nYou can install the library via just downloading the raw text (since it is zero-dependency). You can also clone it from git:\n\n    git clone https://github.com/nirvanasupermind/large-number.git\n\nFor more information, see Github support.\n\n\n## API\n### `constructor()`\nThe LargeNumber constructor. Provides two arguments for the number's significand and exponent. If the exponent is left undefined, it will set to `0` by default, providing easy conversion from `Number`. \n\nThe constructor also converts all pairs to standard form, for example `new LargeNumber(23,1)` gets converted to `new LargeNumber(2.3,2)`.\n\n\n### `prototype.toNum()`\nConverts a `LargeNumber` to a `Number`. Returns `Infinity` for anything \u003e `2^1024 = 1.8e308`, and `0` for anything \u003c `2^-1074 = 5e-324`.\n\n### `prototype.add()`\nAdds two `LargeNumber`s. For example `new LargeNumber(8,1000)+new LargeNumber(2,999)` outputs `new LargeNumber(8.2,1000)`. This is prone to precision loss if the difference between the exponents is large, for example `new LargeNumber(1,1000)+new LargeNumber(1,0)` outputs `new LargeNumber(1,1000)`. A `Number` can be the second argument.\n\n### `prototype.subtract()`\nSubtracts two `LargeNumber`s.  For example `new LargeNumber(8,1000)-new LargeNumber(2,999)` outputs `7.8e1000`. This is prone to precision loss if the difference between the exponents is large enough, for example `new LargeNumber(1,1000)+new LargeNumber(1,0)` outputs `new LargeNumber(1,1000)`. A `Number` can be the second argument.\n\n### `prototype.multiply()`\nMultiplies two `LargeNumber`s. For example, `new LargeNumber(8,1000)*new LargeNumber(2,999)` outputs `new LargeNumber(1.6,2000)`.  A `Number` can be the second argument.\n\n### `prototype.divide()`\nDivides two `LargeNumber`s. For example, `new LargeNumber(8,1000)/new LargeNumber(2,999)` outputs `new LargeNumber(4,0)`.\n\n### `prototype.pow()`\nPowers a `LargeNumber` to a `Number`. For example, `new LargeNumber(8,1000).pow(3)` outputs `new LargeNumber(5.12,3002)`. \n\n### Ovveride methods \n#### `prototype.toString()`\n\nWill convert the LargeNumber to a string. Uses scientific E notation. For example, `LargeNumber(4.5,-2147)` is printed as `4.5e-2147`.\n### Static \n#### `static E`\nA static constant `LargeNumber(2.718281828459045,0)` representing the Euler number constant. \n\n#### `static PI`\nA static constant `LargeNumber(3.141592653589793)` representing the pi constant. \n\n#### `static MAX_VALUE`\nA static constant `LargeNumber(9.999999999999998,1.7976931348623157e+308)` that stores the largest possible value in a `LargeNumber` type.\n\n### `static MIN_VALUE`\nA static constant `LargeNumber(1,-1.7976931348623157e+308)` that stores the smallest possible value in a `LargeNumber` type. \n\n### `static fac()`\nStatic function that returns a `LargeNumber` representing the factorial of a normal `Number`. For example, `LargeNumber.fac(1000)` outputs `new LargeNumber(4.023,2567)`.\n\n\n## License\nLargeNumber is licensed under the MIT license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirvanasupermind%2Flarge-number","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnirvanasupermind%2Flarge-number","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirvanasupermind%2Flarge-number/lists"}