{"_id":"@alisowski/decimal128","name":"@alisowski/decimal128","dist-tags":{"latest":"16.0.2"},"versions":{"16.0.2":{"name":"@alisowski/decimal128","version":"16.0.2","type":"module","description":"Partial implementation of IEEE 754 Decimal128 decimal floating-point numbers","directories":{"test":"tests"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/jessealama/decimal128.js.git"},"sideEffects":false,"scripts":{"build":"tshy","test":"jest","format":"prettier . --write","lint":"prettier . --check","coverage":"npx c8 npx jest"},"prettier":{"trailingComma":"es5","tabWidth":4,"semi":true,"singleQuote":false},"keywords":["decimal","float","number","IEEE","bigdecimal"],"author":{"name":"Jesse Alama","email":"jesse@igalia.com"},"license":"ISC","devDependencies":{"@types/jest":"^29.5.1","c8":"^9.1.0","jest":"^29.5.0","jest-light-runner":"^0.6.0","prettier":"^3.0.0","ts-jest":"^29.1.0","tshy":"^3.0.2","tsx":"^4.10.2","typescript":"^5.1.3"},"licenses":[{"type":"BSD-2-Clause","url":"https://opensource.org/license/bsd-2-clause/"}],"tshy":{"exports":{".":"./src/Decimal128.mts"}},"exports":{".":{"import":{"types":"./dist/esm/Decimal128.d.mts","default":"./dist/esm/Decimal128.mjs"}}},"module":"./dist/esm/Decimal128.mjs","_id":"@alisowski/decimal128@16.0.2","gitHead":"7d0ffef92c69e68fb0f36fab43d6263d31af598c","bugs":{"url":"https://github.com/jessealama/decimal128.js/issues"},"homepage":"https://github.com/jessealama/decimal128.js#readme","_nodeVersion":"18.20.4","_npmVersion":"10.7.0","dist":{"integrity":"sha512-hCIZxgQde2Kq5yAI26E9Nqvq3p23xs0aK5F6FRXInlIY8KdEcF0NxadBjXwk7b8QgexbXXz29URqSOelQWok5A==","shasum":"3c6e81e7d4c79d538db8cbbe6d1515021006e27e","tarball":"https://registry.npmjs.org/@alisowski/decimal128/-/decimal128-16.0.2.tgz","fileCount":40,"unpackedSize":165294,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXeY+jeg39OJlnYOVAMfa8ZctDyuyuO8lfNMfIRxE6nAIgIi5qI4QJgA39rCRezlVmogiPnRt2swzgPWuEqB9c3HU="}]},"_npmUser":{"name":"alisowski","email":"lisowski54@gmail.com"},"maintainers":[{"name":"alisowski","email":"lisowski54@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/decimal128_16.0.2_1723608629499_0.8626122858108225"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-14T04:10:29.407Z","16.0.2":"2024-08-14T04:10:29.650Z","modified":"2024-08-14T04:10:29.907Z"},"maintainers":[{"name":"alisowski","email":"lisowski54@gmail.com"}],"description":"Partial implementation of IEEE 754 Decimal128 decimal floating-point numbers","homepage":"https://github.com/jessealama/decimal128.js#readme","keywords":["decimal","float","number","IEEE","bigdecimal"],"repository":{"type":"git","url":"git+https://github.com/jessealama/decimal128.js.git"},"author":{"name":"Jesse Alama","email":"jesse@igalia.com"},"bugs":{"url":"https://github.com/jessealama/decimal128.js/issues"},"license":"ISC","readme":"# decimal128.js—A userland approximation to IEEE 754 Decimal128 in JavaScript\n\nThis library is a prototype for the [decimal proposal](https://github.com/tc39/proposal-decimal). There should be no observable difference between what this library does and what the proposal is [supposed to do](http://tc39.es/proposal-decimal/). If you find a mismatch, please file [an issue](https://github.com/jessealama/decimal128/issues) in this repo.\n\n## Operations\n\n-   absolute value (`abs`)\n-   addition (`add`)\n-   subtraction (`subtract`)\n-   multiplication (`multiply`)\n-   division (`divide`)\n-   remainder (`remainder`)\n-   rounding (`round`)\n-   `toString` emitting both decimal and exponential syntax (default is decimal)\n\n## Comparisons\n\n-   equality (`equals`) to compare for mathematical equality\n-   less than (`lessThan`) to compare mathematical order\n-   `compare` for comparing Decimals as digit strings (not mathematical order; e.g. `1.2` < `1.20`)\n\n## Implementation\n\nThis package is written in TypeScript. Unit tests are in Jest. There are no other external dependencies.\n\n## Data model\n\nThis package aims to reproduce the IEEE 754 [Decimal128](https://en.wikipedia.org/wiki/Decimal128_floating-point_format) 128-bit decimal floating-point numbers in JavaScript. See the [decimal proposal](https://github.com/tc39/proposal-decimal/). These **decimal** (not binary!) numbers take up 128 bits per number. This format allows for an exact representation of decimal numbers with 34 (decimal) significant digits and an exponent between -6143 and 6144. That's a _vast_ amount of range and precision!\n","readmeFilename":"README.md"}