{"id":23747709,"url":"https://github.com/nirvanasupermind/bigfx","last_synced_at":"2026-03-10T10:30:20.890Z","repository":{"id":65153818,"uuid":"571372609","full_name":"nirvanasupermind/bigfx","owner":"nirvanasupermind","description":"BigFX is a JavaScript decimal fixed-point number library based on BigInt.","archived":false,"fork":false,"pushed_at":"2023-01-03T09:36:59.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T01:02:08.667Z","etag":null,"topics":[],"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}},"created_at":"2022-11-28T01:14:23.000Z","updated_at":"2024-09-27T10:28:34.000Z","dependencies_parsed_at":"2023-01-03T20:22:23.490Z","dependency_job_id":null,"html_url":"https://github.com/nirvanasupermind/bigfx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanasupermind%2Fbigfx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanasupermind%2Fbigfx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanasupermind%2Fbigfx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirvanasupermind%2Fbigfx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nirvanasupermind","download_url":"https://codeload.github.com/nirvanasupermind/bigfx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238930364,"owners_count":19554151,"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":[],"created_at":"2024-12-31T14:55:45.512Z","updated_at":"2026-03-10T10:30:18.813Z","avatar_url":"https://github.com/nirvanasupermind.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bigfx\n[![npm version](https://badge.fury.io/js/bigfx.svg)](https://badge.fury.io/js/bigfx)\n\n`BigFX` is a JavaScript decimal fixed-point number library with unlimited size, based on the native `BigInt`. It supports up to 15 digits of fractional precision, and is internally stored as a `BigInt` scaled by a factor of `1e+15`. `BigFX` can work on both Node.js and the browser.\n\n## Installation\nUsing NPM:\n```\nnpm install bigfx\n```\n\nOn the browser:\n```\n\u003cscript src=\"https://raw.githubusercontent.com/nirvanasupermind/bigfx/main/bigfx.min.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n```\n\n## Example\n```javascript\nvar BigFX = require(\"bigfx\");\nconsole.log(new BigFX(36.9).add(45).mul(94).toFixed(6)); // 7698.600000\nconsole.log(new BigFX(9007199254740991n).add(2).toString()); // 9007199254740993\nconsole.log(BigFX.PI.neg().cos().toString()); // -1\n```\n\n## API\n* `constructor()` - Creates a `BigFX` object equal to 0\n* `constructor(number)` - Creates a `BigFX` object from a number (precision may be lost)\n* `constructor(bigint)` - Creates a `BigFX` object from a `BigInt`\n* `constructor(bigfx)` - Creates a `BigFX` object from another `BigFX` object\n* `clone()` - Returns a clone of a `BigFX` object\n* `neg()` - Returns negation of a `BigFX` object\n* `add(other)` - Returns addition of two `BigFX` objects (converts `other` if needed)\n* `sub(other)` - Returns subtraction of two `BigFX` objects (converts `other` if needed)\n* `mul(other)` - Returns multiplication of two `BigFX` objects (converts `other` if needed)\n* `div(other)` - Returns division of two `BigFX` objects (converts `other` if needed)\n* `mod(other)` - Returns modulo of two `BigFX` objects (converts `other` if needed)\n* `and(other)` - Returns bitwise AND of two `BigFX` objects (converts `other` if needed, only works if both arguments are integers)\n* `or(other)` - Returns bitwise OR of two `BigFX` objects (converts `other` if needed, only works if both arguments are integers)\n* `xor(other)` - Returns bitwise XOR of two `BigFX` objects (converts `other` if needed, only works if both arguments are integers)\n* `shl(other)` - Returns left-shift of two `BigFX` objects (converts `other` if needed, only works if `other` is an integer)\n* `shr(other)` - Returns right-shift of two `BigFX` objects (converts `other` if needed, only works if `other` is an integer)\n* `exp()` - Returns e raised to the power of a `BigFX` object\n* `log()` - Returns natural logarithm of a `BigFX` object\n* `pow(other)` - Returns exponentiation of two `BigFX` objects (converts `other` if needed)\n* `sqrt()` - Returns the square root of a `BigFX` object\n* `sin()` - Returns the sine of a `BigFX` object\n* `cos()` - Returns the cosine of a `BigFX` object\n* `tan()` - Returns the tangent of a `BigFX` object\n* `lt(other)` - Checks if a `BigFX` object is less than another `BigFX` object\n* `le(other)` - Checks if a `BigFX` object is less than or equal to another `BigFX` object\n* `gt(other)` - Checks if a `BigFX` object is greater than another `BigFX` object\n* `ge(other)` - Checks if a `BigFX` object is greater than or equal to another `BigFX` object\n* `eq(other)` - Checks if a `BigFX` object is equal to another `BigFX` object\n* `ne(other)` - Checks if a `BigFX` object is not equal to another `BigFX` object\n* `toNumber()` - Converts a `BigFX` object to a number\n* `toBigInt()` - Converts a `BigFX` object to a `BigInt`\n* `toScaledBigInt()` - Converts a `BigFX` object to a `BigInt` scaled up by a factor of `1e+15` (the internal representation)\n* `toString(radix = 10)`- Converts a `BigFX` object to a string in the specified radix\n* `toFixed(fractionDigits = 0)`- Converts a `BigFX` object to a string with the specified number of fraction digits\n* `toExponential()`- Converts a `BigFX` object to a string in scientific notation format\n* `static ZERO`- A `BigFX` object with a value of 0\n* `static ONE`- A `BigFX` object with a value of 1\n* `static PI`- A `BigFX` object with a value of π\n* `static E`- A `BigFX` object with a value of e\n* `static random()`- Creates a `BigFX` object with a pseudo-random value between 0 and 1","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirvanasupermind%2Fbigfx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnirvanasupermind%2Fbigfx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirvanasupermind%2Fbigfx/lists"}