{"_id":"@bondvet/decimal","_rev":"31-ff23b6e95b3889c999fd03c4c64236e4","name":"@bondvet/decimal","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.3":{"name":"@bondvet/decimal","version":"0.0.3","keywords":["arithmetic","decimal","float","calculation"],"author":{"name":"Samori Gorse","email":"samorigorse@gmail.com"},"license":"MIT","_id":"@bondvet/decimal@0.0.3","maintainers":[{"name":"dvelopment","email":"d@velopment.at"}],"dist":{"shasum":"88ab1b67b784196a81c9fb298c13932339568257","tarball":"https://registry.npmjs.org/@bondvet/decimal/-/decimal-0.0.3.tgz","fileCount":18,"integrity":"sha512-hnkB6yqRVlfrT+YWNBE3lrh7uVTY8wRN4DvvQyRQKXnbZVy27Lds2ClqZ3WRW5RssZG2mMfB13S5aG4UspuE5A==","signatures":[{"sig":"MEUCIH2gs2IWf8ZSoNzxhHtIa3WEWXCNR3VVlSGgNYjgZZNiAiEAypW9GJ1kcuzsJympmgun705XfB7FHLTt+04v53/RlbA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcqYNCRA9TVsSAnZWagAA4LAP/R6Hv/y2+15ee76Ik9UA\nUSmm/HpDUI/Ic3VEeAgYPnAXQrdLdln9pHoUcXG0rlLdhqabzvGm6eAuM6hK\nH5kCbKGD6qjZBj70WcxUO+bZr2cAatnpjWQ5AMwtz0xGPm/V8cRzsYTAfKK3\nG2ZhLk9CQcVOTeft1VJLIv1ZHhEc3DSwdY7opAMaReu3B/Fv4KIESOBRbYMw\ntbEYFPYKY1zU3QYas131epOb5SuQTkYqQfKNFvGFsjHYq25Hyf3leGCN+Zdo\nkToVcEjboSoaSM3IIqeMBJJ75KOzqdnjd+uvTEaRh5H1/VCuzjmbaH+Adm+p\nN0z6xOw03uMG0uEzbXcYyvdFULleBzJBRdZwjH9rwLxF/UyPUVeL/+EIQoI+\nuuStV8ysxR/7W7t5XaA4Zr/8Sa6Cm6GAkrl/LuAAD3LiU4eP75KKAdRUH1O/\ned2AtSqBROgEfM2L7ANoSSQDG+hqAYeyj/f1OK6VuJZA7UQI8NeuAQpPZ5Ss\ndTUnmuH84V41kOXIrd1gauGdSLCdgO9jGb3kfbs5UPlSDhfMSm3uOGVgu+ND\nOt8vC86vbfaXOfKUFJQ8IKstM/682vIwv2L+TdNYyMotKrO4tezBmgTRYGfT\nGahSyX6x7NDMOCn0OOsX1ZtQnYVPDpWAoz6Mza6mJqUmAVAumD7dgmeaZUnx\nmw9J\r\n=KZGI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/decimal","engines":{"node":">=0.4.0"},"_npmUser":{"name":"dvelopment","email":"d@velopment.at"},"repository":{"url":"git://github.com/shinuza/decimal-js.git","type":"git"},"description":"Simple decimal arithmetic for the browser and node.js!","directories":{},"licenseText":"Copyright (c) 2011 Samori Gorse, http://github.com/shinuza/decimal-js\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/decimal_0.0.3_1534240268557_0.7933656972033349","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@bondvet/decimal","version":"0.0.4","keywords":["arithmetic","decimal","float","calculation"],"author":{"name":"Samori Gorse","email":"samorigorse@gmail.com"},"_id":"@bondvet/decimal@0.0.4","maintainers":[{"name":"dvelopment","email":"d@velopment.at"}],"homepage":"https://github.com/Bondvet/decimal-js#readme","bugs":{"url":"https://github.com/Bondvet/decimal-js/issues"},"dist":{"shasum":"191d73408e59625fd139f059534c9f41f6d8ceb4","tarball":"https://registry.npmjs.org/@bondvet/decimal/-/decimal-0.0.4.tgz","fileCount":14,"integrity":"sha512-HISskJTgap21IaWLXGXFysDQ9ZH/5NQBSF7oYYjkC+xfVmEwwV/oC73v39yVW/vaUPKHEm5fLEC413jPEPsE1w==","signatures":[{"sig":"MEYCIQCHhEMQdIeqHW/FuK49a1R49myI6rlWDPWJIY7TCVTlAAIhAMfRJjJMldqYVmNw1pcQFP40YUel5ktrglAE6J0uFDFj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22573,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2BtcCRA9TVsSAnZWagAAsGkP+wULk3T0hHTGlSTqa4mz\n5puf4c7lLfWXZn1WA96MX66d+YstaoZIyq0m0CeEY34fo0tRJODVZ5FQBXgH\nNCq/gEhVVu9o7MjD6BQ2b6PeXIoZoqUJzEnRHUw+Nt5OWcpqXnRtpv59wEnZ\neSV5ACblg4VAUwsQq3kLqsHQPm1JPw5KcuiCmjYXgpVt0cWpNIswIolRnHs5\nbzDB4HgjQoCMzxLvHCwb9pb4e9Srvu7egoL/pG0TMzX3IonUJ21OkuIN1nVe\ntL3rDx0J6BQ/AZJKP7kOcRUm8sPY04d6sbs+ltvcku7altVTIHn+9D9JhDKK\nAVvgrayBX9XRdNA4Jz/6aPJ95k5m3v3YB7axMiTrUAPVZUPLadxuI/ERcHjb\nsv1LW+YAdAtYVHC4Tm+dMuG3bPZAuyjWbYbc2hiV5N5TZU/3pyRq2LXEhkq8\nMeJXO4P5V0ZddAqfRJQk1iFd5I1qbw99ZeuBgKhKFXlYdXYOgDg8D8M1+mIw\n6gwYuJrtP2GkLnP2Toeren/bQ/7cAgv4E0ZE8rdw0kuazCD8+D0HM0N1tsqH\nFkrGN2ZMv430m+AYEQ3byj77kbHONivD2OhntA3Mv++l7PQnRCdOaG6wmKLD\nsf9MRBO1ZY0EUd9Hp2rF9iuP64C8knbhuYlsWPlYHhkN5EZ8ewc/5ntoqRcV\n6Jr5\r\n=GwXr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/decimal","engines":{"node":">=0.4.0"},"gitHead":"f23c12412fe2cf00ff1bc051aff0457e879cb796","_npmUser":{"name":"dvelopment","email":"d@velopment.at"},"repository":{"url":"git+ssh://git@github.com/Bondvet/decimal-js.git","type":"git"},"_npmVersion":"5.6.0","description":"Simple decimal arithmetic for the browser and node.js!","directories":{},"_nodeVersion":"8.9.4","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/decimal_0.0.4_1544975081542_0.1987640442191061","host":"s3://npm-registry-packages"}}},"time":{"created":"2018-08-14T09:51:08.319Z","modified":"2026-07-15T14:53:54.767Z","0.0.3":"2018-08-14T09:51:08.632Z","0.0.4":"2018-12-16T15:44:41.650Z"},"bugs":{"url":"https://github.com/Bondvet/decimal-js/issues"},"author":{"name":"Samori Gorse","email":"samorigorse@gmail.com"},"homepage":"https://github.com/Bondvet/decimal-js#readme","keywords":["arithmetic","decimal","float","calculation"],"repository":{"url":"git+ssh://git@github.com/Bondvet/decimal-js.git","type":"git"},"description":"Simple decimal arithmetic for the browser and node.js!","maintainers":[{"email":"harald@petersilka.com","name":"hpetersilka"},{"email":"harald+npm@bondvet.com","name":"bondvetci"},{"email":"maid.bajric.2012@gmail.com","name":"mabajric"},{"email":"mary@bondvet.com","name":"maryfarner"},{"email":"henrique.spotorno@gmail.com","name":"hspotorno"},{"email":"dustin@smalldoorvet.com","name":"dustinsinger-code"},{"email":"arslan.piric2@gmail.com","name":"arslan.piric"}],"readme":"Decimal\n======\n\nSimple decimal arithmetic for the browser *and* node.js!\n\n\nWhy?\n=======\n\n    Why don’t my numbers, like 0.1 + 0.2 add up to a nice round 0.3,\n    and instead I get a weird result like 0.30000000000000004?\n\n    Because internally, computers use a format (binary floating-point)\n    that cannot accurately represent a number like 0.1, 0.2 or 0.3 at all.\n\nSource : http://floating-point-gui.de/\n\nI wrote this because I needed to do simple computation in the browser\nand I couldn't find a lightweight library to do it.\n\nHow to use?\n===========\n\n\nIn the browser\n--------------\n\n    <script src=\"lib/decimal.js\"></script>\n\nIn node\n-------\n\n    npm install decimal\n\nthen in your program\n\n    var Decimal = require('decimal');\n\n\nExamples\n=======\n\n    >>> 1.1 + 2.2\n    3.3000000000000003\n\n    >>> Decimal('1.1').add('2.2').toNumber()\n    3.3\n\n    >>> 4.01 * 2.01\n    8.060099999999998\n\n    >>> Decimal('4.01').mul('2.01').toNumber()\n    8.0601\n\n    >>> Decimal.mul('4.01', '2.01').toNumber()\n    8.0601\n\n\nCan I help?\n===========\n\nOf course you can, I suck at math, and this implementation is very naive.\nIf you are a math Guru and you see something wrong or a\nway to simplify things you can send in a pull request.\n\n\nMethods\n=======\n\nDecimal(n)\n------------------\n\nCreate a new `Decimal` from `n`. `n` can be a string, integer, or\nanother `Decimal`.\n\n.toString()\n------------------\n\nReturns the `Decimal` instance as a string.\n\n.toNumber()\n-----------\n\nTurn a `Decimal` into a `Number`.\n\n.add(n)\n-------\n\nReturn a new `Decimal` containing the instance value plus `n`.\n\n.sub(n)\n-------\n\nReturn a new `Decimal` containing the instance value minus `n`.\n\n.mul(n)\n-------\n\nReturn a new `Decimal` containing the instance value multiplied by `n`.\n\n.div(n)\n-------\n\nReturn a new `Decimal` containing the instance value integrally divided by `n`.\n\n","readmeFilename":"README.md"}