{"_id":"exact-math","_rev":"12-cf607c18b81f810d81edc8b0af9d852c","name":"exact-math","description":"The exact-math is a set of methods for addition, subtraction, multiplication, division, rounding, ceiling, flooring and powering calculations. It can be used with big number as it handles the floating point problem.","dist-tags":{"latest":"2.2.3"},"versions":{"1.0.0":{"name":"exact-math","version":"1.0.0","description":"exact-math resolves javascript floating point precision problem in the arithmetic addition, subtraction, multiplication and division equations.","main":"lib/exact-math.js","keywords":["math","floating","point","precision","problem","arithmetic","addition","subtraction","multiplication","division"],"repository":{"type":"git","url":"git+https://github.com/devrafalko/exact-math.git"},"author":{"name":"Pawel Rafalko","email":"dev.rafalko@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/devrafalko/exact-math/issues"},"homepage":"https://github.com/devrafalko/exact-math#readme","gitHead":"836ceee4368241de597ee49d28aaff5b0258db54","_id":"exact-math@1.0.0","scripts":{},"_shasum":"a538db43efbd92e072401f9d38490199665ada7e","_from":".","_npmVersion":"4.6.1","_nodeVersion":"6.10.2","_npmUser":{"name":"devrafalko","email":"dev.rafalko@gmail.com"},"dist":{"shasum":"a538db43efbd92e072401f9d38490199665ada7e","tarball":"https://registry.npmjs.org/exact-math/-/exact-math-1.0.0.tgz","integrity":"sha512-Vk/0KXQhiLDesx3uaACBfim04/70L34jsI4wDPJNq30C9dhiix0VkrkQxwy4EMN+T2Lrr3VQ1pbyjh+0pZ8Z/A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICdejvnQaXB4CQOCur0SrHvBkvtPR0fbaeyWgqpDiKEgAiB86ZdW5vxbGRoPqyyW3GZTmyNODKrUmxzUsIyy0G+rDw=="}]},"maintainers":[{"name":"devrafalko","email":"dev.rafalko@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exact-math-1.0.0.tgz_1496279995609_0.5755812248680741"},"directories":{}},"2.0.0":{"name":"exact-math","version":"2.0.0","description":"The exact-math is a set of methods for addition, subtraction, multiplication, division, rounding, ceiling, flooring and powering calculations. It can be used with big number as it handles the floating point problem.","main":"dist/exact-math.node.js","keywords":["math","floating","point","precision","problem","IEEE","754","arithmetic","calculation","addition","subtraction","multiplication","division","add","subtract","multiply","divide","round","rounding","ceil","ceiling","floor","flooring","power","formula","parentheses","result","big","integer","safe"],"repository":{"type":"git","url":"git+https://github.com/devrafalko/exact-math.git"},"author":{"name":"Paweł Rafałko","email":"dev.rafalko@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/devrafalko/exact-math/issues"},"homepage":"https://github.com/devrafalko/exact-math#readme","scripts":{"start":"webpack --config webpack.dev.js","build":"webpack --config webpack.prod.js","test":"cross-env karma_spec_mode=noFailures karma start","test-err":"cross-env karma_spec_mode=full karma start"},"dependencies":{"of-type":"^2.2.0","move-on":"^2.1.6"},"devDependencies":{"@babel/cli":"^7.1.0","@babel/core":"^7.0.1","@babel/node":"^7.0.0","@babel/preset-env":"^7.0.0","babel-loader":"^8.0.2","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^5.2.0","join-array":"^1.1.1","styles-loader":"^1.0.0","uglifyjs-webpack-plugin":"^1.3.0","webpack":"^4.19.1","webpack-cli":"^3.1.1","webpack-karma-jasmine":"^3.0.4","webpack-merge":"^4.1.4","webpack-node-externals":"^1.7.2"},"gitHead":"939a4cd87203d270a81495c314f15f6abedd7ea8","_id":"exact-math@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"devrafalko","email":"dev.rafalko@gmail.com"},"dist":{"integrity":"sha512-qjMny5IikwwmJd8DU/wn/94l3msjgiWzPeWL/68Pzw7n0hDgxnSvcCd3MWdQ0JJUPX1FehRbOiJcDYdKkKm3Dg==","shasum":"c4058e99fe5ef1ce4059aece7895dfdc1d6e90f4","tarball":"https://registry.npmjs.org/exact-math/-/exact-math-2.0.0.tgz","fileCount":57,"unpackedSize":1084160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9MAZCRA9TVsSAnZWagAAIx0QAJJKj8NYDkSNQiGL0n9K\ndZ7721QpZuBy/x1iaM9PiNMcDINC2F4hmAtzyJp7kQsoAQ+YxvYkJ+Miui7v\n5Y0i9hvUqLMkC4PbZ6uvEiThfYteJ+lJtfH9yJex71hIe6ga53Ad1TY9wSSJ\nhRelq3eZg9WWAsXpvVbhejkDjABhnVwHYh3XZd361m9SNSppCYqz1s4/N95B\n3vXDS3jfUL2czR4lw/nRoFNR6rU4nTIOHtxkWBPKsUU5sVeKE11UyVc3jWID\n9FHm+ebp0EsmcPKfMsb8grZjfUjbS4e1zIceRwC2wv2Z2ftLwrby2QXIjrBy\no0Mjs8IhRr3wcLQNOXWMWzFlqUJw8KRX70mr9G/EKxbLBkt0hK/2SS6v0avf\ncRyl+qhq/8d+gfplwlQusZtY4mk0u1SGuyZbJRFLKRMiFUpgD1EYZAkzP2FP\nabjSvjphFJxQT9pcmdeGNNJCsslHAqyk5Nbsz/7OkspvmzL3agTpVjecZAxA\n89iG9my7VQIsEKax1bbB5omwXnlXHDRSY8pP9/9V4QeSN10jcQMxoSu3Fne9\nkHxNPPO7m7IV8bFhly+hYfMsWCcRLhl2ts+pTbE5/9K+y8Zvx9hCAIJsijI1\nlYiixuPZXXpH+ionSbLb6CiGtnKw02H44i30w2EMdLoXMnJwe54K+Zeem0ZH\nYyP2\r\n=3xYX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuRDIxdeZhqM5tTLQg9wT+uHIR8vqdtut6g4tjW4yQQwIhAPFdILtFPBtOArGEWcO1RKYJeHRRAJ+0vm4oPDW4YzYc"}]},"maintainers":[{"name":"devrafalko","email":"dev.rafalko@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exact-math_2.0.0_1542766616240_0.1757560966828009"},"_hasShrinkwrap":false},"2.0.1":{"name":"exact-math","version":"2.0.1","description":"The exact-math is a set of methods for addition, subtraction, multiplication, division, rounding, ceiling, flooring and powering calculations. It can be used with big number as it handles the floating point problem.","main":"dist/exact-math.node.js","keywords":["math","floating","point","precision","problem","IEEE","754","arithmetic","calculation","addition","subtraction","multiplication","division","add","subtract","multiply","divide","round","rounding","ceil","ceiling","floor","flooring","power","formula","parentheses","result","big","integer","safe"],"repository":{"type":"git","url":"git+https://github.com/devrafalko/exact-math.git"},"author":{"name":"Paweł Rafałko","email":"dev.rafalko@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/devrafalko/exact-math/issues"},"homepage":"https://github.com/devrafalko/exact-math#readme","scripts":{"start":"webpack --config webpack.dev.js","build":"webpack --config webpack.prod.js","test":"cross-env karma_spec_mode=noFailures karma start","test-err":"cross-env karma_spec_mode=full karma start"},"dependencies":{"of-type":"^2.2.0","move-on":"^2.1.6"},"devDependencies":{"@babel/cli":"^7.1.0","@babel/core":"^7.0.1","@babel/node":"^7.0.0","@babel/preset-env":"^7.0.0","babel-loader":"^8.0.2","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^5.2.0","join-array":"^1.1.1","styles-loader":"^1.0.0","uglifyjs-webpack-plugin":"^1.3.0","webpack":"^4.19.1","webpack-cli":"^3.1.1","webpack-karma-jasmine":"^3.0.4","webpack-merge":"^4.1.4","webpack-node-externals":"^1.7.2"},"gitHead":"cefa4442b78972fc84d614843efe33f0bc5c246e","_id":"exact-math@2.0.1","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-v7/2riYLWCa3gInufxklIb3cFWMxKpTcd48FRLEMF0ZGhcy155BKhngvA/30syJ9N+xadCnuxn3A3tuimARYEQ==","shasum":"808d737a83138fb8d392e857be8310baedfd47b7","tarball":"https://registry.npmjs.org/exact-math/-/exact-math-2.0.1.tgz","fileCount":57,"unpackedSize":1084689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7ChSCRA9TVsSAnZWagAApcwP+wTYO0Z79nfRHqTwhZGW\n5A8TWgOpFovXrfArTenn5/pEug1mID4qXmgt4flUCjLSz2DiMsdAwbmGxcE1\nT0skMDC+HV57bZkC0GrTIItparaGS38p5dixj/KGc7r0s1LxmqcLlOIDswkh\nXt9tBJTsOGk+p6icxwDY1iG20bFqoOj+2za0VtN6sxZErDEL+h5Dx/8/9KD/\nx0IujPuU44+XUfYa91Qj8HSLgIapvKGyfF12RHGYDHdporeUUitLNWPWHpwv\nawAtDsLZZLTame3M6yLJ2gboyJyXqBj5YJAq3Qmry3LQo1YteLFqYUyFr1Tn\nmSzSoFTdxUgkHMggae6Tle4ktjXbifQWPWtZylWUVS1Hdh93cbCJuatYO/j9\nLbxCI73hh8SdcLUHGnYumADIuUFC610CY6DkttiLp1CmY3AM2PWfs5ta6O4r\nqPlGsPJ1S9oSCY3Q2X99zj9Jdwg4M53IL4WHm4ESPZvb0b/CaoLVgRBBaszx\nu94CODaPfWDnCbJXIdtqhLtzGPAc8vAdXPUrMifmXjfSa8IQycpXd9B0caS1\nwgwYvecVsa+outkeeILLiEBDGPfDGCiRwZtqw4yVCbUoyHYv66G7dtMRmpt7\n9eKKG7cYTqQtbaELHJXuttbfpQLt44chJbCsarJ18IkIOzOzEh9KMTDjhzbc\nYodI\r\n=jjH7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBIdhlNziTtiSeA9GoiWcluSTAJmyZKkCVYoiecTufkXAiEAoXWAXz0D9PJSJY2viqo18WakKq1/eap6LkbsgHAQ+k4="}]},"maintainers":[{"name":"devrafalko","email":"dev.rafalko@gmail.com"}],"_npmUser":{"name":"devrafalko","email":"dev.rafalko@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exact-math_2.0.1_1558980689388_0.561337200755563"},"_hasShrinkwrap":false},"2.1.0":{"name":"exact-math","version":"2.1.0","description":"The exact-math is a set of methods for addition, subtraction, multiplication, division, rounding, ceiling, flooring and powering calculations. It can be used with big number as it handles the floating point problem.","main":"dist/exact-math.node.js","keywords":["math","floating","point","precision","problem","IEEE","754","arithmetic","calculation","addition","subtraction","multiplication","division","add","subtract","multiply","divide","round","rounding","ceil","ceiling","floor","flooring","power","formula","parentheses","result","big","integer","safe"],"repository":{"type":"git","url":"git+https://github.com/devrafalko/exact-math.git"},"author":{"name":"Paweł Rafałko","email":"dev.rafalko@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/devrafalko/exact-math/issues"},"homepage":"https://github.com/devrafalko/exact-math#readme","scripts":{"start":"webpack --config webpack.dev.js","build":"webpack --config webpack.prod.js","test":"cross-env karma_spec_mode=noFailures karma start","test-err":"cross-env karma_spec_mode=full karma start"},"dependencies":{"move-on":"^2.1.6","of-type":"^3.0.2","terser-webpack-plugin":"^1.3.0"},"devDependencies":{"@babel/cli":"^7.1.0","@babel/core":"^7.0.1","@babel/node":"^7.0.0","@babel/preset-env":"^7.0.0","babel-loader":"^8.0.2","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^5.2.0","join-array":"^1.1.1","styles-loader":"^1.0.0","uglifyjs-webpack-plugin":"^1.3.0","webpack":"^4.19.1","webpack-cli":"^3.1.1","webpack-karma-jasmine":"^3.0.4","webpack-merge":"^4.1.4","webpack-node-externals":"^1.7.2"},"gitHead":"212c0fea9297fe252576548dbeb1b7454a71da46","_id":"exact-math@2.1.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-443MsnGQG6stl6gI/MYkk5SXK+fdR8mnUXfwl9mYHAOX79R0qObtXhDvxL4r0FA9tUpHu71UoYrvjjtcnVFxjA==","shasum":"6388ecae31970831e19d260f6e83e49b459fd8b3","tarball":"https://registry.npmjs.org/exact-math/-/exact-math-2.1.0.tgz","fileCount":58,"unpackedSize":1144992,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHMHBCRA9TVsSAnZWagAA5JwP/3bhZOO8iqloS8soh8fA\nTvC68XvIFqWkg60HNibzw5yeuKVQIo+KOIagvgBCmfEQ9Uxl1Qcv0oLbIZfk\nIC5tR2Zu2Y0u6q+rKY/S0IT6GKucoSuebArIRYoEZfcMgX2REDUasQffn7Jy\nERz45AOaO7LDhpI+Xf/RZ9wN7r7akHdahBr7jjlXjKTsB4UK6QYcAy1m9u/M\nHrcyZLYDhoSiuBqOcdfiQd/d18c05rMyCAiA2MumeVzQgm+JeA6HSz6uM36x\njRP88I53CXaC+PcuRWIauytFUPHpifYkjQ6SEkTx44P2yW9Qsf7aUmBSEDH1\nYCrDfPQdwxkBFU6U6d7GY8SCTNgSi4FXtNmWsYmToQ13+lMpQtNlLF99Hbno\nAa+rBALDI/sn1bTFyjg3D27xKg+N6Jmqq1VMfhTgM0O1FvcJsov6FjX416mR\nNuMWcQS6NS582ZKch4DbAhoh/Baee2/5L8nGzGIxCK0cLT6mkcKXJfMcwuiO\nNkg5O1GyHtaU1JHDVU2O9iSE64kTy9ltOQ1lZSvrHTFRHFilSsznU4ugUIjf\n6cAOvMwbYvs0VMBvoJq+rJG0rTCxMSn27IxifFvTlUibpJQTiaykg4bDE7tj\nq3ur+tKH+UaICYMxLbBy686MGjZ2JBA8/GVkToocLcBvfHW+MG7f+L22talR\na6Zb\r\n=aAWL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTOhx6Oex9xKba98nnkOPhslE4Q20UXo1R3WTdeHivOwIhALzWy/Y1aaeppldWG+X+aZJBKRmK8foDv3Jmn06284lr"}]},"maintainers":[{"name":"devrafalko","email":"dev.rafalko@gmail.com"}],"_npmUser":{"name":"devrafalko","email":"dev.rafalko@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exact-math_2.1.0_1562165696834_0.8699338394554295"},"_hasShrinkwrap":false},"2.1.2":{"name":"exact-math","version":"2.1.2","description":"The exact-math is a set of methods for addition, subtraction, multiplication, division, rounding, ceiling, flooring and powering calculations. It can be used with big number as it handles the floating point problem.","main":"dist/exact-math.node.js","keywords":["math","floating","point","precision","problem","IEEE","754","arithmetic","calculation","addition","subtraction","multiplication","division","add","subtract","multiply","divide","round","rounding","ceil","ceiling","floor","flooring","power","formula","parentheses","result","big","integer","safe"],"repository":{"type":"git","url":"git+https://github.com/devrafalko/exact-math.git"},"author":{"name":"Paweł Rafałko","email":"dev.rafalko@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/devrafalko/exact-math/issues"},"homepage":"https://github.com/devrafalko/exact-math#readme","scripts":{"start":"webpack --config webpack.dev.js","build":"webpack --config webpack.prod.js","test":"cross-env karma_spec_mode=noFailures karma start","test-err":"cross-env karma_spec_mode=full karma start"},"dependencies":{"move-on":"^2.1.6","of-type":"^3.0.2"},"devDependencies":{"@babel/cli":"^7.1.0","@babel/core":"^7.0.1","@babel/node":"^7.0.0","@babel/preset-env":"^7.0.0","babel-loader":"^8.0.2","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^5.2.0","join-array":"^1.1.1","styles-loader":"^1.0.0","uglifyjs-webpack-plugin":"^1.3.0","webpack":"^4.19.1","webpack-cli":"^3.1.1","webpack-karma-jasmine":"^3.0.4","webpack-merge":"^4.1.4","webpack-node-externals":"^1.7.2"},"gitHead":"170b16d8dc36f5b57b4aba110cbaf3ed86320879","_id":"exact-math@2.1.2","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-owApWmjgiEmAL/6gj3dKd7wyj3G7QH8smwNRVTKB81qax4WUCIxQhj8XxayYc6qwsnHzom8afBzPs1G2EpwDmQ==","shasum":"faa86377feab824bf0533aad355b220467d3d56a","tarball":"https://registry.npmjs.org/exact-math/-/exact-math-2.1.2.tgz","fileCount":58,"unpackedSize":1144953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXuKRCRA9TVsSAnZWagAAAvYP/1y7jArenuOjwkTuLTOw\n2oV4S8I5DsKWSImgB0muZGJvuiVuTDM+YRkwS0hYu5kyn7ZQ/W5yaECAUc+j\nJFZOqaDP2qBL4NtLy5sBPCS1s/uTeN32NHqF+Gv7C2SL4RmOC93nnZc+iC+K\nJxzEA8lPVyr1J+D2x3h5B+n0+9qNjRXHL6e433li2edWewPwjyLFSluENxmf\nqmN39rqB91nRSTOgwDitDxLJ7EkBzH3EuXyj4Dj59ClHX1pR0llx4qCJL1wC\nPJABkIk4/IerAhzJZ3S0m68Whu0jIXnGa35bzMsxDla2sdGD7qpy61zHfTvQ\nec0GrAisCTs7v5lj3CfDBgwSWhr01QuU11bZbQLiQETRV/AZybWSnPzkfzRf\ntyRwmJeZ6fbxiwuo5oi+DE+lR5/4sCjosyrCFya+mxLSm48ixy3tpEE47unJ\ncl4WBZg+v07t4iuC5bh3Vr8NnrJNC9kfBqH4w3xxsPXGPYeaLtKpul6RJTAb\na7f2xrc45fqTc6r8jwKjYzm+EufAOfYwJPxz5zErAOhz4tFANH77CNDJ4U/S\nFaDMvuKheLXACuDZaLw9NcT0mF+K0BPjEHaeRahIaymZP/juoxMa22BMWBeW\nodLsWkq8I98dBF+1d/diEHD6QSVtwHzr3Q17ycUdvDV2m7IGrYNP2EprupT6\nxpx+\r\n=a6gu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHubkaIT0f6lmHk+ZAFVNUw30MNOMUdeGX3JsrZ0BZeSAiEAtYel7s1BL+AiQLI+JoXA/W/7lJ2SXbbqCeCSfnzD9Dw="}]},"maintainers":[{"name":"devrafalko","email":"dev.rafalko@gmail.com"}],"_npmUser":{"name":"devrafalko","email":"dev.rafalko@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exact-math_2.1.2_1566499472263_0.6371689026742744"},"_hasShrinkwrap":false},"2.1.3":{"name":"exact-math","version":"2.1.3","description":"The exact-math is a set of methods for addition, subtraction, multiplication, division, rounding, ceiling, flooring and powering calculations. It can be used with big number as it handles the floating point problem.","main":"dist/exact-math.node.js","keywords":["math","floating","point","precision","problem","IEEE","754","arithmetic","calculation","addition","subtraction","multiplication","division","add","subtract","multiply","divide","round","rounding","ceil","ceiling","floor","flooring","power","formula","parentheses","result","big","integer","safe"],"repository":{"type":"git","url":"git+https://github.com/devrafalko/exact-math.git"},"author":{"name":"Paweł Rafałko","email":"dev.rafalko@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/devrafalko/exact-math/issues"},"homepage":"https://github.com/devrafalko/exact-math#readme","scripts":{"start":"webpack --env.dev","build":"webpack --env.prod","test":"cross-env karma_spec_mode=noFailures karma start","test-err":"cross-env karma_spec_mode=full karma start"},"dependencies":{"move-on":"^2.1.6","of-type":"^3.0.2"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.9.0","@babel/node":"^7.8.7","@babel/preset-env":"^7.9.5","babel-loader":"^8.1.0","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^7.0.2","join-array":"^1.1.1","styles-loader":"^2.0.0","terser-webpack-plugin":"^2.3.5","webpack":"^4.43.0","webpack-cli":"^3.3.11","webpack-karma-jasmine":"^4.0.0","webpack-merge":"^4.2.2","webpack-node-externals":"^1.7.2"},"gitHead":"5d5284c1cc00dd1fef426a566bd428e786e6f49c","_id":"exact-math@2.1.3","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-1+gYtk2MFqfY4C1EuPh0pFWTiUS4tjU1d4JmS2WgU0SrD2td2HinYoqQdthxDeWstDtSxNsYxM9W4Vk12uFPBg==","shasum":"1619f09369ec28a34c87027f18b13716ff449aa3","tarball":"https://registry.npmjs.org/exact-math/-/exact-math-2.1.3.tgz","fileCount":53,"unpackedSize":1090909,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepAo4CRA9TVsSAnZWagAA/koP/ArouMpMElZaJA0oJI2T\nZr9PF3WbxN6nTODaCMF1zzlQWJ3zrfZP05+pyfe2JPECJX10v6IGgoo9AYhg\nSxAKISyVbv6dd0ThvjDYcvFpkKbL5yIDtIW0dtFhTNoFS7kmcJMpnUWWLQrR\nJGnMN4mPEdyAqGUutww4aQBI8RDkyjFUAT571oBVokBVkbRwKcpXAnhw99rK\nmSt1QW7Q8QxruR6w3FhZG3QBjug+ZOBfYtXECjGMgFIqzk3d1F/9q8l0RYxA\n3+UVbN7prGll1n/oV+rHL1HXbzQbItDhqRyYqIh5TJ6RT+AhDvfF2EL7IGld\nLZxZrls1mTrt7WC1/XES41VaUs8aSyaks45ZfthH0WoklaGMZzmMdIkcAQjD\ngX1LhxbHjMZpEvQou17iav5tOo8v+ATg6CZz0PxWxI3zvIcC1PSk/+n6Nn2F\nDKQars5QxqqQ2bKhRxXvin+i/ai7WwQYG3GKNn+9IwoHP2YCKVwwUj1AWwBa\nE6RbnpuVRNwpcOb37Sh8cUPcmhF2qjuVjfEX7zonDFP8MQ/wgQ93wEVM8NRJ\nmIZQO6oZKgNC9Tf8OW/bdgdIMi8OlOr4bVhJjRZEh9r/g3G8cSPQ8nl4pzoV\n7no8VsNpPsFKVWrHxU1IeeC8ipRdSsO3j5lRqNZ9ifNUNKxdR2iROmrJLj2s\nuP4D\r\n=WJjB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID7NxO5sX1J9w/upCJoSVUOYlv9b86X39x1QWSB0GOHkAiBpS6M2XiGEyqqd0mvZh7ilY90h9D1L2nMNG7pEODPpAg=="}]},"maintainers":[{"name":"devrafalko","email":"dev.rafalko@gmail.com"}],"_npmUser":{"name":"devrafalko","email":"dev.rafalko@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exact-math_2.1.3_1587808824186_0.2766454608161033"},"_hasShrinkwrap":false},"2.2.0":{"name":"exact-math","version":"2.2.0","description":"The exact-math is a set of methods for addition, subtraction, multiplication, division, rounding, ceiling, flooring and powering calculations. It can be used with big number as it handles the floating point problem.","main":"dist/exact-math.node.js","keywords":["math","floating","point","precision","problem","IEEE","754","arithmetic","calculation","addition","subtraction","multiplication","division","add","subtract","multiply","divide","round","rounding","ceil","ceiling","floor","flooring","power","formula","parentheses","result","big","integer","safe"],"repository":{"type":"git","url":"git+https://github.com/devrafalko/exact-math.git"},"author":{"name":"Paweł Rafałko","email":"dev.rafalko@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/devrafalko/exact-math/issues"},"homepage":"https://github.com/devrafalko/exact-math#readme","scripts":{"start":"webpack --env.dev","build":"webpack --env.prod","test":"cross-env karma_spec_mode=noFailures karma start","test-err":"cross-env karma_spec_mode=full karma start"},"dependencies":{"move-on":"^2.1.6","of-type":"^3.0.2"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.9.0","@babel/node":"^7.8.7","@babel/preset-env":"^7.9.5","babel-loader":"^8.1.0","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^7.0.2","join-array":"^1.1.1","styles-loader":"^2.0.0","terser-webpack-plugin":"^2.3.5","webpack":"^4.43.0","webpack-cli":"^3.3.11","webpack-karma-jasmine":"^4.0.0","webpack-merge":"^4.2.2","webpack-node-externals":"^1.7.2"},"gitHead":"9e9c511028b25697332869f66a4b20745aac5e4a","_id":"exact-math@2.2.0","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-2F1R7z3PcpMizssp+6R1VCNjFoHEeKYqnufYaDdnm+Aka2K1/dTcUznnOSWgtkeGheotHmbUfK7kFrStVKLFlw==","shasum":"868813b815a8c3b265e8aa426fea2633e76dc04e","tarball":"https://registry.npmjs.org/exact-math/-/exact-math-2.2.0.tgz","fileCount":53,"unpackedSize":1100795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewA6bCRA9TVsSAnZWagAA3PEP/0B9wWOFvQaFgZvdAB+8\nJYYYNG97BNILNAM6evWb3qZriWUDQwsluCAKgUCYdF61T7LYM7EkgYpGvSIv\nGek96xixitIYO27vDb1Ocr1jEgeSQyj+XmZ4i2MCUi2Y9RBi96EF2Qp8L27G\nLkHJY4MwObVpnfWmu5Vv4HOk7IoZHGEY9eo6i6ARDii4FIWHaU3eAPUp0q7m\nokjcGrk3Xv91HjFnRVZhz88CHtN8PsTAoB6bQ/RipkmrJ2f4EohlCkNZmemM\nm502XVp84WORP4t3s5LbZ2hnlQPDFGYS5gM3ghlo9cGIsHFt3RI1j/3bNZXO\n9HLy/HoFUsmANPmk0WScVsylJu/t/G0wo5i0V14qdWr2+3nVqKZwt63LZp7O\nteCuL/KR97eSh0xiLYu6TBd8nQepoovD1jEttFM50DFkixTHH1PJbCcAwl7+\nV6GtnYqHh7C7vAbYN/kjO0sGBBWsShuojS8xFrPor9g/RYJ2b2UjQw0hjiHw\nzbWcLCvVAClmYqthuZM3/aSwH73v0NaWK+NVg/stKsVkP67Aea41NoBjMWHl\nSYRPYwwpkMfQQuChwZCA1lnoyb0tXqCaFpbyQFR1uO4mgpT/BoowoRo5IRXZ\nhh/fklt4XBFAd0CcGKPED4oX+Rq9FOt2Tu+UBPCktx5En5cemAWYu4FHEgNr\nU0M3\r\n=b1kD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHmnTURKXDI2pR7+3PjeVhNxBcftSiCO4RzS7/7zoDNWAiBrsjvZ2R64GaChDMw4KFGS3cSgcwj+7XAwFFuvKYSO1w=="}]},"maintainers":[{"name":"devrafalko","email":"dev.rafalko@gmail.com"}],"_npmUser":{"name":"devrafalko","email":"dev.rafalko@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exact-math_2.2.0_1589644954315_0.26187827139028763"},"_hasShrinkwrap":false},"2.2.1":{"name":"exact-math","version":"2.2.1","description":"The exact-math is a set of methods for addition, subtraction, multiplication, division, rounding, ceiling, flooring and powering calculations. It can be used with big number as it handles the floating point problem.","main":"dist/exact-math.node.js","keywords":["math","floating","point","precision","problem","IEEE","754","arithmetic","calculation","addition","subtraction","multiplication","division","add","subtract","multiply","divide","round","rounding","ceil","ceiling","floor","flooring","power","formula","parentheses","result","big","integer","safe"],"repository":{"type":"git","url":"git+https://github.com/devrafalko/exact-math.git"},"author":{"name":"Paweł Rafałko","email":"dev.rafalko@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/devrafalko/exact-math/issues"},"homepage":"https://github.com/devrafalko/exact-math#readme","scripts":{"start":"webpack --env.dev","build":"webpack --env.prod","test":"cross-env karma_spec_mode=noFailures karma start","test-err":"cross-env karma_spec_mode=full karma start"},"dependencies":{"move-on":"^2.1.6","of-type":"^3.0.2"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.9.0","@babel/node":"^7.8.7","@babel/preset-env":"^7.9.5","babel-loader":"^8.1.0","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^7.0.2","join-array":"^1.1.1","styles-loader":"^2.0.0","terser-webpack-plugin":"^2.3.5","webpack":"^4.43.0","webpack-cli":"^3.3.11","webpack-karma-jasmine":"^4.0.0","webpack-merge":"^4.2.2","webpack-node-externals":"^1.7.2"},"gitHead":"5cd7bd89ac5f50a380ecbb458939d379953d5f0a","_id":"exact-math@2.2.1","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-/tragi4knSEz6YyYGwoyn8cVelwC5COIHE4gSsKup5812HjUTqtf+thkIkqt6rDAqUkszORQj7jUY/TpPxWEtw==","shasum":"f4338773725180df17774d4f4e4bcad87b435620","tarball":"https://registry.npmjs.org/exact-math/-/exact-math-2.2.1.tgz","fileCount":4,"unpackedSize":139286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfU9QKCRA9TVsSAnZWagAAUZgQAJkCG9uMEcYqAB1kRWcD\nqeaeuhKr59rBKh/lvTV7p2C2tcdBHvZmlrzPKkxHp4bde5oKpeyi1JCH1s9h\nr93YO8SACJ4Rn50KZTeeK/fj6klCVeW5ISf3yiae8KjX41W5GorjT8rXU+gk\nKR/zSFT+/463/LYWNYUUyuCNBV6R/cCBekkdHP6SdTQ41rCQkMjuBODjjkhK\nZ8zOmEm9t4viHbes0ok4S9N5oR5i+PTWe8NPcE7v09jRSZb2V9rEIjKGQk2u\nrsPkj5ewZl4VjH4oq6NQNJ2Fwi84KdkBegFvSULiztAv6qcrmltvCIZweXVT\nawPBa56MGsnEpycICjvrd1DlNfYUU51Kx65UhGEHJgRLfrwez0Arc6FtUQtm\nHJL3PehaQ/c7IE52WVCLkkS4mBaRH1VAJhYU8FnyLIUEy3EptQX/izb80N7k\nLbb8aDPVoqKbv5kgNhjSIjxd2GM0490dgTsBp9fCb1BimExsf+VHvRc7cYNF\nHiWlQkyd/kMLZgql+cwyle8aVoZ1BrPZ4urT33lLLBNHC9EJROwufe0TYX7b\n1g8rxu6X7eADrwEmNaLvDNA5zHYBcpKGzDSKW3rxXsSa41wBl9up58R22kz1\ntjcYRjn1TTAY0gzQLiXAjrEUB7aC5hGdZV8eyQw9rwGBcumZ8hHOGXs//s0y\nk91n\r\n=rIEb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBxKNie/j1AUoVwIkCXrthm83Zw3AIhuKBpnMJQi7twYAiAng8jb7hwwLK3RlbZcbcdilNKars74e0FY7pfmCnRfhw=="}]},"maintainers":[{"name":"devrafalko","email":"dev.rafalko@gmail.com"}],"_npmUser":{"name":"devrafalko","email":"dev.rafalko@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exact-math_2.2.1_1599329290385_0.2878961553129282"},"_hasShrinkwrap":false},"2.2.2":{"name":"exact-math","version":"2.2.2","description":"The exact-math is a set of methods for addition, subtraction, multiplication, division, rounding, ceiling, flooring and powering calculations. It can be used with big number as it handles the floating point problem.","main":"dist/exact-math.node.js","keywords":["math","floating","point","precision","problem","IEEE","754","arithmetic","calculation","addition","subtraction","multiplication","division","add","subtract","multiply","divide","round","rounding","ceil","ceiling","floor","flooring","power","formula","parentheses","result","big","integer","safe"],"repository":{"type":"git","url":"git+https://github.com/devrafalko/exact-math.git"},"author":{"name":"Paweł Rafałko","email":"dev.rafalko@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/devrafalko/exact-math/issues"},"homepage":"https://github.com/devrafalko/exact-math#readme","scripts":{"start":"webpack --env.dev","build":"webpack --env.prod","test":"cross-env karma_spec_mode=noFailures karma start","test-err":"cross-env karma_spec_mode=full karma start"},"dependencies":{"move-on":"^2.1.9","of-type":"^3.0.4"},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/node":"^7.10.5","@babel/preset-env":"^7.11.5","babel-loader":"^8.1.0","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^7.0.2","join-array":"^1.1.3","styles-loader":"^2.0.0","terser-webpack-plugin":"^4.1.0","webpack":"^4.44.1","webpack-cli":"^3.3.12","webpack-karma-jasmine":"^4.0.0","webpack-merge":"^5.1.3","webpack-node-externals":"^2.5.2"},"gitHead":"e2fe4d7c3822fab3d5cc565a873fab29c1ef5ea3","_id":"exact-math@2.2.2","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-Hfpdh8mdLlc1R+L0zL98mTJtqHbvAqWdjloJMnUz0CwAiw0h6kJW80PjFyCVclwrCnuomLJsg5urioUmF7dBIQ==","shasum":"3ddcb6ee9b13393cb08e854d8bb65b07ce0012f8","tarball":"https://registry.npmjs.org/exact-math/-/exact-math-2.2.2.tgz","fileCount":3,"unpackedSize":79301,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfU91kCRA9TVsSAnZWagAABaUP/jV0p1pYJiBcXnHmiEv4\nDmf40+PXGWugpaEmLAdn0agwh2Mi0cbvHHiLEy2bmQfdEZip40XFJzmW6NTh\nJ5hpMrnu/qyafeCbCTHAfnOiRau/pQZgG2m+mY/wZnbyU6kqvKQgeaayxbk0\nKxm02mJXlbTld2/2fcs+p4Zpv6vpJYmQi7aDx/JkTPVg6lFlcTLGjN1CEf2L\naoO73EdgJhD9k9+Y5n4Oau6cZklSku8qjEPstyfT+OF2izXJyJrVIrCoLUwf\nmDJMzt/90fKYUrrN4+B+8pycEyBLk11dcF+kWHKAKwqA2ioKrbK/tzo2eaZv\nniS7ue/2itXjYghDJyDkaU2J/S/DZnnTwmmnTwSATxWIKPavmrFS1elNM+P1\nIMdE5xmnPIkwOJRXcxI6bSkz+AYpP2V4dd4XKL0hw6OMSy7O1mZkldTVjAQJ\nAKBeJNxMyVAISd9OneuYJbznvJznx6pss9gawDYiZtndZdDk2D0EbwhcoJ1b\nhsOg7pg/MPUuLxxqXzuf7vk0c8ipWStCiGEANlF9OjH2ZnTbe/KGxKG4ODYR\nfpJVouldZJeYjQOqQzq/NbLuX6QeiLQ5KoOw1kPd/niIoV9tVM/dJQt2df8f\n3Ls9Ufw614qROWCv3BdyKF/3ISr7pqnuV7L8BwDbEZD/1Q2mtWB+HFEc7k8M\nRwbY\r\n=H/xG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFpr3Viabitk3g/pQeRrkZtVPMkilt0ZKTmuBqwbYi38AiEA+3XH8k6uub8X84/d9RFMuXZPfeIZD3q1127tlH6edUo="}]},"maintainers":[{"name":"devrafalko","email":"dev.rafalko@gmail.com"}],"_npmUser":{"name":"devrafalko","email":"dev.rafalko@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exact-math_2.2.2_1599331684320_0.9452728597088695"},"_hasShrinkwrap":false},"2.2.3":{"name":"exact-math","version":"2.2.3","description":"The exact-math is a set of methods for addition, subtraction, multiplication, division, rounding, ceiling, flooring and powering calculations. It can be used with big number as it handles the floating point problem.","main":"dist/exact-math.node.js","keywords":["math","floating","point","precision","problem","IEEE","754","arithmetic","calculation","addition","subtraction","multiplication","division","add","subtract","multiply","divide","round","rounding","ceil","ceiling","floor","flooring","power","formula","parentheses","result","big","integer","safe"],"repository":{"type":"git","url":"git+https://github.com/devrafalko/exact-math.git"},"author":{"name":"Paweł Rafałko","email":"dev.rafalko@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/devrafalko/exact-math/issues"},"homepage":"https://github.com/devrafalko/exact-math#readme","scripts":{"start":"webpack --env.dev","build":"webpack --env.prod","test":"cross-env karma_spec_mode=noFailures karma start","test-err":"cross-env karma_spec_mode=full karma start"},"dependencies":{"move-on":"^2.1.9","of-type":"^3.0.4"},"devDependencies":{"@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/node":"^7.10.5","@babel/preset-env":"^7.11.5","babel-loader":"^8.1.0","babel-plugin-add-module-exports":"^1.0.0","cross-env":"^7.0.2","join-array":"^1.1.3","styles-loader":"^2.0.0","terser-webpack-plugin":"^4.1.0","webpack":"^4.44.1","webpack-cli":"^3.3.12","webpack-karma-jasmine":"^4.0.0","webpack-merge":"^5.1.3","webpack-node-externals":"^2.5.2"},"gitHead":"9c52f9f3b14d1372d4e1eb887f9fe02706032f4b","_id":"exact-math@2.2.3","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-ggSoWm3NUCXlSGvaXsU3l1hWJ9kdbI81tBgwDT/MrLGoN1Y7uX/QmJ6W5aoYGomd5hUWFaDGJdkXrTZdRd4RWw==","shasum":"abddca7d243c093756206a59091eaf83c6e6ab47","tarball":"https://registry.npmjs.org/exact-math/-/exact-math-2.2.3.tgz","fileCount":4,"unpackedSize":142596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjHS4CRA9TVsSAnZWagAAMkkP/iwAXVxTLd8QrAhG0reC\nrpYct20kF4IeqbLEOnp8WozPwCVMxjGrlpoj/2Z3+LchZkmOKOnk7mxSPo8o\nRwd0+sKRjuDsV4ml7AUaOtsDOv1OsbucDwGvgV/6dSdvuZyCGfa8rPegNEWk\nJu7cXgOw4L2QfqFPkU4CKOpb0mjAiQ5MfZv3WIizAdAOfas8lcr37vJMN0sy\nXy0zIsEVAfurVM2jT3+qw2QdQJ+naIj/tzQeQTfMrzyqyk9ZGBVT8ECClT1q\nnJ7lyDiQBoQC4Lx6s1Q8l4P+agpgNrpKckRSkfcKQJUJRtBviDwUPvZ8gSq8\n6hkuackUlGI15mb4hZ1UO9Pp5chT/LObYKGgwZCHaNY/+nm7NknZ4RuHbXSi\n7NjCkQac8XZX9S47aalrnevPOzRxaJuFH9Nuh7Vh2a3CaIWXeYrrkHjD159l\nwimElM+dHVQtyzaC0pk72y0a+9tk6VDXX5Tcwk9LXP3eP17VhlipeugyQRoJ\nP2Yo1PV9APEsBKbpqONHfAPhuS+v6dyZgY/ODv+ZV2MLbgEbV0ZYAv6n+J3F\nb7f1kxjDLR7NzfWzgsl9jlALE7+1WjiG8A9LOFVLJ1LwngDr5J+8eIb2O+sK\nWjim3ElzbpwCG4UPhjIYO0RSIwqh8N47VcYAFjfAx2f3hPQMnWaum1os3Gay\n/XBZ\r\n=rnDl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2/W5YZS2/XuTAUrim5iC/6F65NiFu4gKDg1Bb7jZaQwIhALJI34cQZkyn+K1QJdwc+m29GOEHvM9bIz/Xv/QN7Ckj"}]},"maintainers":[{"name":"devrafalko","email":"dev.rafalko@gmail.com"}],"_npmUser":{"name":"devrafalko","email":"dev.rafalko@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exact-math_2.2.3_1603040439447_0.7854802459504484"},"_hasShrinkwrap":false}},"readme":"### In This Documentation\r\n1. [Description](#description)\r\n2. [Implementation](#implementation)\r\n3. [Tests](#tests)\r\n4. [Features](#features)\r\n5. [Methods](#methods)  \r\na. [add, sub, mul, div](#add-sub-mul-div)  \r\nb. [formula](#formula)  \r\nc. [round, ceil, floor](#round-ceil-floor)  \r\nd. [pow](#pow)\r\n6. [config parameter](#config-parameter)  \r\na. [returnString](#returnstring)  \r\nb. [decimalChar](#decimalchar)  \r\nc. [divChar](#divchar)  \r\nd. [mulChar](#mulchar)  \r\ne. [eMinus](#eminus)  \r\nf. [ePlus](#eplus)  \r\ng. [maxDecimal](#maxdecimal)  \r\nh. [divideByZeroError](#dividebyzeroerror)  \r\ni. [invalidError](#invalidError)  \r\nj. [trim](#trim)  \r\n7. [callback parameter](#callback-parameter)\r\n8. [Return](#return)\r\n9. [Samples](#samples)\r\n\r\n# Description\r\nThe `exact-math` library is a set of methods for math calculations like: adding, subtracting, multiplying, dividing, rounding, flooring, ceiling and powering.  \r\nIt also allows to use [String] math formulas, eg. `5.55*(7/.33)-2`  \r\nIt works with big numbers and small decimals and gives a precise result.  \r\nIt allows to use [String|Number] values and it gives the [String|Number] result.\r\n\r\n# Implementation\r\n\r\n#### with NodeJS\r\n`npm install exact-math --save`\r\n\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nexactMath.add(5, 5); //10\r\nexactMath.sub('25.5','.5'); //25\r\nexactMath.mul(2, '2', 5, .1); //2\r\nexactMath.div('55', 2); //27,5\r\nexactMath.formula('4*(12/3)-7.77'); //8.23\r\nexactMath.round(123456, 5) //120000\r\nexactMath.ceil(0.123456789, -3) //0.124\r\nexactMath.floor(9.999, 1) //9\r\nexactMath.pow(2, 5); //32\r\n```\r\n\r\n#### with Browser\r\n\r\n#### Add `exact-math.js` library to the HTML file.\r\nThe library is located in `./dist/exact-math.js` directory.  \r\nIt is a webpack&babel bundled cross-browser library version.  \r\nThe library is accessible as `exactMath` variable in the global *(window)* scope.\r\n```html\r\n<head>\r\n  <script src='exact-math.js'></script>\r\n  <script>\r\n     var result = exactMath.mul(.5, .3);\r\n  </script>\r\n</head>\r\n```\r\n\r\n# Tests\r\n```\r\n> git clone https://github.com/devrafalko/exact-math.git\r\n> cd exact-math\r\n> npm install\r\n> npm test\r\n```\r\n\r\n# Features \r\n\r\n#### How it works:\r\n* check out the [calculation simulator](https://devrafalko.github.io/exact-math/simulator) that shows how the `exact-math` works compared with the JS regular arithmetic operations\r\n* the program computes all possible combinations of calculations between minimal and maximal value entered\r\n* put eg. `min: 1` `max: 5` `step: 0.1` `number: 2` `select: multiplication`\r\n\r\n\r\n#### Floating point problem:\r\n* all numbers in JavaScript are stored as [IEEE-754 64-bits floating point numbers](http://floating-point-gui.de/)\r\n* the `exact-math` resolves the **floating point problem** and returns the precise result\r\n\r\n|Code|JavaScript result|`exact-math` result|\r\n|:---:|:---:|:---:|\r\n| `0.1 + 0.2` |0.30000000000000004|0.3|\r\n| `0.4 * 0.2` |0.08000000000000002|0.08|\r\n| `0.45 - 0.15` |0.30000000000000004|0.3|\r\n| `.82 / 10` |0.08199999999999999|0.082|\r\n| `1.4 - 0.6 - 0.4 - 0.4` |-1.1102230246251565e-16|0|\r\n\r\n#### Big integers and small decimals\r\n* If the value is **not a safe integer** *(is bigger than `2⁵³-1` or lower than `-2⁵³-1`)* [\\[read more\\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger) the result of calculation is **not precise**\r\n* the `exact-math` does the calculations on **big integers** and **small decimals** and gives a precise result\r\n\r\n```javascript\r\nconst config = { returnString: true };\r\nlet result = exactMath.sub('92179342550763210809069221175572', '11779955999989769291989599', config);\r\n//'92179330770807210819299929185973'\r\n\r\nlet result = exactMath.add('3.00000000000000000015', '12.00000000000000020020', config);\r\n//'15.00000000000000020035'\r\n```\r\n\r\n\r\n#### Arithmetic formulas\r\n* in order to calculate the mathematical formulas, eg. `2*(5+.3)/13*(2.2*4)`, it must be the part of the code or the `eval()` method must be used\r\n* the `exact-math` allows to calculate the [String] arithmetic formulas, using regular expressions to parse the given formula rather than `eval()` [\\[see below\\]](#formula)\r\n\r\n#### Rounding integers and decimals\r\n* the JavaScript `Math.round` method allows to round the value only to the nearest **integers**. In order to round the value to the chosen decimal place or to the tens, hundreds, thousands, etc., you need some workarounds\r\n* the `exact-math` allows to **round**, **floor** and **ceil** the values both to the whole integers *(ones, tens, hundreds, thousands, etc.)* and decimals *(tenths, hundredths, thousandths, ten-thousandths, etc.)* [\\[see below\\]](#round-ceil-floor)\r\n\r\n# Methods\r\n\r\n### `add`, `sub`, `mul`, `div`\r\n#### exactMath.add(x, y[, z[, ...]][, [config](#config-parameter)][, [callback](#callback-parameter)])\r\n> `add`, `sub`, `mul` and `div` methods take the same arguments\r\n\r\n#### `x, y`\r\n**Type:** [Number|String]\r\n* **two or more** [Number|String] numerical values **must** be passed as the arguments\r\n* the **third** `z` argument and the **next ones** numerical values are **optional**\r\n* the **subtraction** and **division** calculations are performed **from left to right**\r\n* it accepts all legal [Number] values, eg: `1.5`, `2e+3`, `-.4`\r\n* if the [String] argument is passed, it must be parse-able to the [Number] value, eg: `'1.5'`, `'2e+3'`, `'-.4'`\r\n* it does not accept `NaN`, `Infinity` and `-Infinity`\r\n* see the [\\[samples\\]](#the-addition-subtraction-division-and-multiplication-methods-usage)\r\n\r\n### `formula`\r\n#### exactMath.formula(formula[, [config](#config-parameter)][, [callback](#callback-parameter)])\r\n* the [String] `formula` is an arithmetical formula\r\n* the `exact-math` uses regular expressions to parse [String] formula into the regular JavaScript formula\r\n* **mind** that it does not use `eval()`\r\n* see the [\\[samples\\]](#the-formula-method-usage)\r\n* The `formula` can contain:\r\n  * `[0-9]` digits\r\n  * `1.5`, `0.5` or `.5` decimal fractions\r\n  * `-5`, `-.4`, `-5.55` negative values\r\n  * `2e-2`, `.25e+12`, `-3e-10` exponential notation values\r\n  * `*` multiplication sign *(also `x`, `×` and `⋅` [see [config.mulChar](#mulchar)])*\r\n  * `/` division sign *(also `:` and `÷` [see [config.divChar](#divchar)])*\r\n  * `+` plus sign\r\n  * `-` subtraction sign\r\n  * `(` and `)` parentheses\r\n* the arithmetic **order of operations** is respected:\r\n  * *parentheses first*\r\n  * *then division and multiplication (from left to right)*\r\n  * *then addition and subtraction (from left to right)*\r\n* the multiplication sign can be omitted before parentheses; *`4(2+1)` is equal to `4*(2+1)`*\r\n* the following signs combinations are allowed:\r\n  * `2 * -2` *equals to `2 * (-2)`*\r\n  * `2 / -2` *equals to `2 / (-2)`*\r\n  * `+2 + 2` *equals to `2 + 2`*\r\n  * `2 + +2` *equals to 2 + 2*\r\n  * `-2 - -2` *equals to `-2 + 2`*\r\n  * `-2 - +2` *equals to `-2 - 2`*\r\n  * `-2 + -2` *equals to `-2 - 2`*\r\n* the (multi)spaces between values, signs and parentheses are allowed:\r\n  * `2 + 2`\r\n  * `2 +  ( -2 - -2)`\r\n  * ` 2  +  (+2  +   +4   /   -1)`\r\n  * `  -.1   -   -5`\r\n  * `2 + 3e-5`\r\n  * `.25e+5 * -.25e-5`\r\n* the spaces are **not allowed** between:\r\n  * negative sign and value: `-2 - - 2`\r\n  * period and digit in decimal fraction: `5 + . 3`\r\n  * exponential notation formula: `.2 e-5`, `2e - 5`, `3e +10`\r\n\r\n### `round`, `ceil`, `floor`\r\n#### exactMath.round(value[, places][, [config](#config-parameter)][, [callback](#callback-parameter)])\r\n> `round`, `ceil` and `floor` methods take the same arguments  \r\n\r\n#### `value`\r\n**Type:** [Number|String]\r\n* **one** [Number|String] numerical value must be passed as the argument\r\n* it accepts all legal [Number] values, eg: `1.5`, `2e+3`, `-.4`\r\n* if the [String] argument is passed, it must be parse-able to the [Number] value, eg: `'1.5'`, `'2e+3'`, `'-.4'`\r\n* it does not accept `NaN`, `Infinity` and `-Infinity`\r\n\r\n#### `places`\r\n**Type:** [Number] *(optional)*  \r\n**Default:** `1`\r\n  * the given `value` will be rounded *(or rounded up when `ceil` or rounded down when `floor`)* to the `places` digit\r\n  * the `places` must be a positive or negative [Number] **integer**\r\n  * the negative `places` value rounds the `value` to the **decimals**. The positive `places` value rounds the `value` to the **integers**.\r\n  * the `0` returns the given `value` without rounding it.\r\n  * when the `places` argument is omitted, the **default** `1` value is used\r\n  * study the table below and see the [\\[samples\\]](#the-round-ceil-and-floor-methods-usage)\r\n\r\n|`places`|exactMath.round|exactMath.floor|exactMath.ceil|\r\n|:---:|:---:|:---:|:---:|\r\n|`0`|`14993.00159`|`14993.00159`|`14993.00159`|\r\n|`1`|`14993`|`14993`|`14994`|\r\n|`2`|`14990`|`14990`|`15000`|\r\n|`3`|`15000`|`14900`|`15000`|\r\n|`4`|`15000`|`14000`|`15000`|\r\n|`5`|`10000`|`10000`|`20000`|\r\n|`6`|`0`|`0`|`100000`|\r\n|`-1`|`14993`|`14993`|`14993.1`|\r\n|`-2`|`14993`|`14993`|`14993.01`|\r\n|`-3`|`14993.002`|`14993.001`|`14993.002`|\r\n|`-4`|`14993.0016`|`14993.0015`|`14993.0016`|\r\n|`-5`|`14993.00159`|`14993.00159`|`14993.00159`|\r\n\r\n### `pow`\r\n#### exactMath.pow(value[, power][, [config](#config-parameter)][, [callback](#callback-parameter)])\r\n\r\n#### `value`\r\n**Type:** [Number|String]\r\n\r\n* **one** [Number|String] numerical value must be passed as the argument\r\n* it accepts all legal [Number] values, eg: `1.5`, `2e+3`, `-.4`\r\n* if the [String] argument is passed, it must be parse-able to the [Number] value, eg: `'1.5'`, `'2e+3'`, `'-.4'`\r\n* it does not accept `NaN`, `Infinity` and `-Infinity`\r\n\r\n#### `power`\r\n**Type:** [Number] *(optional)*  \r\n**Default:** `2`\r\n  * the given `value` will be raised to the `power` exponent\r\n  * the `power` must be a positive [Number] **integer**\r\n  * the `value` raised to the **`0`** `power` returns the **`1`** as a result, according to the approved mathematical convention\r\n  * when the `power` argument is omitted, the **default** `2` value is used\r\n  * see the [\\[samples\\]](#the-pow-method-usage)\r\n\r\n# `config` parameter\r\n#### `config`\r\n**Type:** [Object|Boolean] *optional*  \r\n**Default:** `false`\r\n* **each** `exact-math` method may take the `config` argument. It allows to configure the additional settings.\r\n* the `config` argument can be passed as `[Object]` object with config properties or as `[Boolean]` value\r\n* if the `config` argument is passed as `true`, it is the shortcut of the [`config.returnString`](#returnstring) property set to `true` [\\[samples\\]](#the-config-returnstring-property-set-as-boolean-argument)\r\n* if the `config` argument is passed as `false` or if it is not defined *(it is set to `false` by default then)*, it is the shortcut of the [`config.returnString`](#returnstring) property set to `false` [\\[samples\\]](#the-config-returnstring-property-set-as-boolean-argument)\r\n* if the `config` argument is passed as [Object] object, it may take the config properties [\\[described below\\]](#object-config-properties)\r\n* if the `config` argument is not passed or if some [Object] config properties are not defined or defined with the incorrect type or value, the **default** values are used instead for these properties\r\n\r\n\r\n### [Object] `config` properties:\r\n\r\n#### `returnString`\r\n**Type:** [Boolean]  \r\n**Default:** `false`  \r\n* by default, the **[Number]** value is **returned** as the result of the calculation\r\n* if the result value is bigger *(or lower)* than a safe integer `2⁵³-1` or `-2⁵³-1`, the [Number] value  may be inaccurate; `Number('1111222233334444567')` ==> `1111222233334444500`\r\n* if the `returnString` property is set to `true`, the **accuare** [String] value is returned; `'1111222233334444567'`.\r\n* the [String] result can be used to the further `exact-math` calculations as it takes the [String] numerical value arguments [\\[see above\\]](#x-y)\r\n* see the [\\[samples\\]](#the-config-returnstring-property-usage)\r\n\r\n> If you use [Number] **[unsafe values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger)** for the computation, the **imprecise result is returned**;  \r\neg. `exactMath.add(100000000000000000055,5.00000000000000022)`.  \r\nIf you use [Number] **[safe values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger)** for the computation it may still return the **imprecise unsafe result value**;  \r\neg. `exactMath.mul(101101000110,10010110010001) => 1.0120321332222232e+24`.  \r\nIn order to avoid the imprecise results always use [String] numerical values for the calculations and set the [`config.returnString`](#returnstring) parameter to `true`.  \r\nThe **[String]** numerical values passed as the arguments and the **[String]** result returned by the `exact-math` **are always safe**.\r\n\r\n#### `decimalChar`\r\n**Type:** [String|Array:string]  \r\n**Default:** `['.', ',']`\r\n* it applies only for **[String] values**\r\n* in javaScript, the [Number] decimal fraction's notation requires the `.` period character, while out-of-coding notations sometimes also allows `,` comma character\r\n* this setting lets to choose which characters are allowed for decimal fraction values *(the characters other than `.` and `,` will be ignored)*. The default value will be used, if the illegal value has been passed\r\n* the legal `decimalChar` settings samples: `','`, `'.'`, `['.']`, `[',']`, `['.', ',']`, etc. \r\n* by **default**, the [String] value may contain the decimal fractions with both `.` and `,` character, eg: `'4,5'`, `'3.5 + 2,2'`, `'0,55 / 6.22'`. \r\n* in order to allow **only** `.` character (and thereby forbid `,` character), set `decimalChar` property to [String] `.` or [Array] `['.']`\r\n* it may turn out handy especially for the end-users that will fill the inputs with some numbers or math formulas, that will be further passed through the `exact-math` module to calculate some result. The `,` usage would not throw an error then\r\n* see the [\\[samples\\]](#the-config-decimalchar-property-usage)\r\n\r\n#### `divChar`\r\n**Type:** [String|Array:string]  \r\n**Default:** `['/', ':', '÷']`\r\n* it applies only for [String] **formulas** in the [`formula`](#formula) method\r\n* in javaScript, the division operation requires the `/` character, while out-of-coding notations sometimes also allows `:` colon or `÷` division sign *(unicode: `'\\u00F7'`)* character\r\n* this setting lets to choose which characters are allowed for [`formula`](#formula) division operations *(the characters other than `/`, `:` and `÷` will be ignored)*. The default value will be used, if the illegal value has been passed\r\n* the legal `divChar` settings samples: `'/'`, `':'`, `'÷'` `['/', ':']`, `[':', '÷']`, `['÷', ':', '/']`, `['/']`, etc. \r\n* by **default**, the [String] formula may contain `/`, `:` and `÷` for division operations, eg: `'22 / 4'`, `100:2`, `'4.5 * (5÷.1)/3'`\r\n* in order to allow **only** `/` character (and thereby forbid `:` and `÷` character), set `divChar` property to [String] `/` or [Array] `['/']`\r\n* it may turn out handy especially for the end-users that will fill the inputs with some division math formulas, that will be further passed through the `exact-math`.`formula` method to calculate some result. The `:` or `÷` usage would not throw an error then\r\n* see the [\\[samples\\]](#the-config-divchar-property-usage)\r\n\r\n#### `mulChar`\r\n**Type:** [String|Array:string]  \r\n**Default:** `['*', 'x', '×', '⋅']`\r\n* it applies only for [String] **formulas** in the [`formula`](#formula) method\r\n* in javaScript, the multiplication operation requires the `*` character, while out-of-coding notations sometimes also allows `x` letter, `⋅` dot operator *(unicode: `'\\u22C5'`)* or `×` multiplication sign *(unicode: `'\\u00D7'`)* characters\r\n* this setting lets to choose which characters are allowed for [`formula`](#formula) multiplication operations *(the characters other than `*`, `x`, `×` and `⋅` will be ignored)*. The default value will be used, if the illegal value has been passed\r\n* the legal `mulChar` settings samples: `'*'`, `'x'`, `'×'`, `'⋅'`, `['*', 'x', '×', '⋅']`, `['*']`, `['x']`, `['*', '⋅']` etc.\r\n* by **default**, the [String] formula may contain `*`, `x`, `×` and `⋅` for multiplication operations, eg: `'5 * 4'`, `4x2`, `3×6`, `'4.5 * (3x.2)*3'`, `'3 ⋅ 3 \\ 2'`\r\n* in order to allow **only** `*` character (and thereby forbid `x`, `×` and `⋅` character), set `mulChar` property to [String] `*` or [Array] `['*']`\r\n* it may turn out handy especially for the end-users that will fill the inputs with some multiplication math formulas, that will be further passed through the `exact-math`.`formula` method to calculate some result. The `x`, `×` or `⋅` usage would not throw an error then\r\n* see the [\\[samples\\]](#the-config-mulchar-property-usage)\r\n\r\n#### `eMinus`\r\n**Type:** [Number]  \r\n**Default:** `7` \r\n* it applies **for the [String] results only** *(when the [`config.returnString`](#returnstring) property is set to `true` or when the [`callback`](#callback-parameter) is passed)*\r\n* by default, the [String] result for **decimal** values is parsed and written with **exponential notation**, if it has got `7` or more decimal places and it begins with zeros, eg. `'0.01'`, `'0.00001'`, but `'0.1e-7'` rather than `'0.00000001'`.\r\n* set `eMinus` property to the other than default [Number] positive **integer** to decide when the decimal result should be written with exponential notation\r\n* set `Infinity` if the decimal value should never be presented with exponential notation, regardless of how long the [String] decimal value is\r\n* **mind** that `eMinus` **does not round** the value *(like `Number.prototype.toExponential`)* - it only shorten the long-zero values when possible, eg. the `0.123123123123123` will never be shorthened\r\n* this setting may matter for example when the result value is directly printed for the user and you want to avoid displaying the exponential notation in the printed numbers\r\n* it makes no difference for the `exact-math`, whether the [String] value with exponential notation, or without, is passed as the argument for the calculation: `exactMath.add('0.00005','5e-5')`\r\n* see the [\\[samples\\]](#the-config-eplus-and-eminus-properties-usage)\r\n\r\n#### `ePlus`\r\n**Type:** [Number]  \r\n**Default:** `21` \r\n* it applies **for the [String] results only** *(when the [`config.returnString`](#returnstring) property is set to `true` or when the [`callback`](#callback-parameter) is passed)*\r\n* by default, the [String] result for **integers** is parsed and written with **exponential notation** if it has got `21` or more digits and it ends with zeros, eg. `'10000'`, `'10000000000'`, but `'1e+21'` rather than `'1000000000000000000000'` and `1000000000005e+8` rather than `100000000000500000000`\r\n* set `ePlus` property to the other than default [Number] positive **integer** to decide when the integer result should be written with exponential notation\r\n* set `Infinity` if the integer value should never be presented with exponential notation, regardless of how long the [String] integer value is\r\n* **mind** that `ePlus` **does not round** the value *(like `Number.prototype.toExponential`)* - it only shorten the long-zero values when possible, eg. the `123123123123` will never be shorthened\r\n* this setting may matter for example when the result value is directly printed for the user and you want to avoid displaying the exponential notation in the printed numbers\r\n* it makes no difference for the `exact-math`, whether the [String] value with exponential notation, or without, is passed as the argument for the calculation: `exactMath.add('1e+21','1000000000000000000000')`\r\n* see the [\\[samples\\]](#the-config-eplus-and-eminus-properties-usage)\r\n\r\n#### `maxDecimal`\r\n**Type:** [Number]  \r\n**Default:** `17` \r\n* it applies **only to division** calculations *(also to division calculations in the `formula` method)*\r\n* if the result of **division** calculation is a **decimal fraction** with a huge or infinite number of decimal places, the `maxDecimal` property indicates the **maximal number of decimal places** of the [String] result value, to avoid stack overflow\r\n* if the result value is a decimal fraction with the number of decimal places higher than the default `17`, it is **rounded** to 17 decimal places\r\n* in order to get more *(or less)* precise result, define `maxDecimal` property with a desirable integer value\r\n* the `maxDecimal` [Number] value must be an **integer**, bigger or equal to `0` and cannot be an `Infinity`\r\n* it **does not round** the results of addition, multiplication or subtraction calculations\r\n* see the [\\[samples\\]](#the-config-maxdecimal-property-usage)\r\n\r\n#### `divideByZeroError`\r\n**Type:** [Boolean|Error|Function]  \r\n**Default:** `false`  \r\n* by default `false`, when the value is **divided by** `0` or if the `0` is **divided by** `0` - the `NaN` is returned as the result\r\n* set `true` in order to **throw** the default error; *This `error` will be thrown only if the [`callback`](#callback-parameter) is not defined. Otherwise it is accessible via the `error` property in the [`callback`](#callback-parameter) function.*\r\n* set [Error] object and it will be thrown **rather than** the default error; *This error will be thrown only if the [`callback`](#callback-parameter) is not defined. Otherwise it is accessible via the `error` property in the [`callback`](#callback-parameter) function.*\r\n* set [Function] and:\r\n  * This function is called **rather than** throwing error\r\n  * This function is called **instead** of `callback` function *(if defined)*\r\n  * If you **return** some value in this function, this value will be returned by the `exact-math` as the **result** of the calculation rather than the default `NaN`\r\n  * The function will be called with the one [Object] argument passed with the following properties:\r\n    * `error`: the default error\r\n    * `index`: the [Number] index of `0`-value argument *(for `div` method, otherwise it is `undefined`)*\r\n    * `list`: the [Array] list of all passed values\r\n    * `callback`: the reference to the [Function] callback *(if defined, otherwise it is `undefined`)*\r\n* see the [\\[samples\\]](#the-config-dividebyzeroerror-property-usage)\r\n\r\n#### `invalidError`\r\n**Type:** [Boolean|Error|Function]  \r\n**Default:** `true`  \r\n* by default `true`, if the argument of incorrect type has been passed, or if it hasn't been passed when required, or if any of the passed numerical value arguments is [String] **incorrect** value, is `NaN`, `Infinity` or `-Infinity` *(that is forbidden)* - the default error is **thrown**; *This error will be thrown only if the [`callback`](#callback-parameter) is not defined. Otherwise it is accessible via the `error` property in the [`callback`](#callback-parameter) function.*\r\n* set `false` and the `NaN` will be returned as the result without throwing an error\r\n* set [Error] object and it will be thrown **rather than** the default error; *This error will be thrown only if the [`callback`](#callback-parameter) is not defined. Otherwise it is accessible via the `error` property in the [`callback`](#callback-parameter) function.*\r\n* set [Function] and:\r\n  * This function is called **rather than** throwing error\r\n  * This function is called **instead** of `callback` function *(if defined)*\r\n  * If you **return** some value in this function, this value will be returned by the `exact-math` as the **result** of the calculation rather than the default `NaN`\r\n  * The function will be called with the one [Object] argument passed with the following properties:\r\n    * `error`: the default error\r\n    * `index`: the [Number] index of the incorrect argument, *(otherwise, if the error does not concern the argument, it is `undefined`)*\r\n    * `list`: the [Array] list of all passed values\r\n    * `callback`: the reference to the [Function] callback *(if defined, otherwise it is `undefined`)*\r\n* see the [\\[samples\\]](#the-config-invaliderror-property-usage)\r\n\r\n#### `trim`\r\n**Type:** [Boolean]  \r\n**Default:** `true`  \r\n* it applies to **round**, **ceil** and **floor** calculations\r\n* by default `true`, when the value is rounded to the decimals, and there are some **zero** decimals at the end of the value *(2.23000)*, they are **trimmed** *(2.23)*\r\n* in order to keep the **fixed** number of decimal integers, set the `trim` config property to `false`\r\n* **have in mind** to set the `returnString` config value to `true`, as the returned `[Number]` result value will have the last decimal zeros trimmed due to the default JavaScript behaviour\r\n* see the [\\[samples\\]](#the-config-trim-property-usage)\r\n\r\n\r\n|`places`|value| exactMath.round {trim: true}|exactMath.round {trim: false}|\r\n|:---:|:---:|:---:|:---:|\r\n|`-1`|`15.0006`|`15`|`15.0`|\r\n|`-2`|`15.0006`|`15`|`15.00`|\r\n|`-3`|`15.0006`|`15.001`|`15.001`|\r\n|`-4`|`15.0006`|`15.0006`|`15.0006`|\r\n\r\n# `callback` parameter\r\n#### `callback`\r\n**Type:** [Function] *optional*  \r\n**Default:** `undefined`\r\n* if the [Function] `callback` argument is defined, the [`config.divideByZeroError`](#dividebyzeroerror) or [`config.invalidError`](#invalidError) error is not thrown automatically\r\n* the `callback` is called with the one [Object] argument passed with the following properties:\r\n  * `error`  \r\n    If the [`config.divideByZeroError`](#dividebyzeroerror) or [`config.invalidError`](#invalidError) is set to `true`, it refers to the default error.  \r\n    If the [`config.divideByZeroError`](#dividebyzeroerror) or [`config.invalidError`](#invalidError) is set to [Error], it refers to this error.  \r\n    Otherwise it is `null`.\r\n  * `number`  \r\n    If `error` is `null`, it is the [Number] result value of the calculation.  \r\n    Otherwise it is `NaN`\r\n  * `string`  \r\n    If `error` is `null`, it is the [String] result value of the calculation.  \r\n    It is defined regardless of the [`config.returnString`](#returnstring) property.  \r\n    Otherwise it is `NaN`.  \r\n    This value is always accurate for the unsafe numbers `>2⁵³-1 || <-2⁵³-1`.  \r\n    This value can be used for the further `exact-math` calculations.\r\n* see the [\\[samples\\]](#the-callback-property-usage)\r\n\r\n\r\n# Return\r\n* by default, the **[Number]** value is returned as the **result** of the calculation\r\n* the **[String]** value is returned as the **result** of the calculation, if the [`config.returnString`](#returnstring) property is set to `true`\r\n* the **`NaN`** is returned if the [`config.invalidError`](#invalidError) property is set to `false` and one of the passed arguments is invalid\r\n* the **`NaN`** is returned if the [`config.divideByZeroError`](#dividebyzeroerror) property is set to `false` and the value is divided by `0` or if `0` is divided by `0`\r\n* the object|value **returned** in the [Function] [`config.divideByZeroError`](#dividebyzeroerror) or [`config.invalidError`](#invalidError) is returned if this function has been called as the sequence of an error occurance\r\n\r\n# Samples\r\n##### The `addition`, `subtraction`, `division` and `multiplication` methods usage\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nexactMath.add(7, -7, '223', -223); //0\r\nexactMath.add('234.4564395832045903', '-645.266756645345334545345', true); //'-410.810317062140744245345'\r\nexactMath.sub('3.0000000000000005', '2.0000000000000001', '1.0000000000000003'); //1e-16\r\nexactMath.sub('292855679192089e-24', '79958000101700102e-24', true); //'-7.9665144422508013e-8'\r\nexactMath.mul('0.000000001020050888', '0.000000100777030252', true); //'1.02797699198555463776e-16'\r\nexactMath.mul('2345205680246529456', '34957892456802348602346', true); //'81983447959140172789843887025738719703776'\r\nexactMath.div(10, 2, 2, 2, 2); //0.625\r\nexactMath.div(432.5, .11, '2.000000000044', true); //'1965.90909086584090909'\r\n```\r\n\r\n##### The `formula` method usage\r\n\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nexactMath.formula('2 + 2'); //4\r\nexactMath.formula('3*(5-2)'); //9\r\nexactMath.formula(' 2.5  *   2.5  /   .1'); //62.5\r\nexactMath.formula('3.5+5*(-4-(3/(3+1)-12*3-.2*22)-16/4*12-5/(2)+3.5+2.5*(1.5-2*7))-16'); //-225.5\r\nexactMath.formula('.25e+2*10'); //250\r\n```\r\n\r\n##### The `round`, `ceil` and `floor` methods usage\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nexactMath.round(880225, 4); //880000\r\nexactMath.ceil(99999995, 4); //100000000\r\nexactMath.floor(99999995, 3); //99999900\r\nexactMath.ceil(0.123, 3); //100\r\nexactMath.ceil(0.000028, -1); //0.1\r\nexactMath.round(0.000028, -5); //0.00003\r\nexactMath.floor(0.000028, -5); //0.00002\r\nexactMath.floor('99999.0000009910009', -5); //99999\r\nexactMath.ceil('99999.0000009910009', -5); //99999.00001\r\n```\r\n\r\n##### The `pow` method usage\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nexactMath.pow(2, 0); //1\r\nexactMath.pow(155.55, 0); //1\r\nexactMath.pow(2, 1); //2\r\nexactMath.pow(2, 2); //4\r\nexactMath.pow(2, 100, { returnString: true }); //'1267650600228229401496703205376'\r\nexactMath.pow(-2, 6); //64\r\nexactMath.pow(5.55, 5); //948.79400625\r\nexactMath.pow(.1, 150); //1e-150\r\n```\r\n\r\n##### The config `returnString` property set as [Boolean] argument\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nexactMath.add(22, 55); //77 [Number]\r\nexactMath.add(22, 55, false); //77 [Number]\r\nexactMath.add(22, 55, true); //'77' [String]\r\nexactMath.mul('0.20', '0.3000000'); //0.06 [Number]\r\nexactMath.div('9947619', 25, false); //397904.76 [Number]\r\nexactMath.round('99999.0000009910009', -7, true); //'99999.000001' [String]\r\nexactMath.sub(0.000008, 0.000003); //0.000005 [Number]\r\nexactMath.floor('9081726354.4536271809', -2, false); //9081726354.45 [Number]\r\nexactMath.pow(10, 19, true); //'10000000000000000000' [String]\r\n```\r\n\r\n##### The config `returnString` property usage\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nexactMath.add(2, 2, { returnString: false }); //4\r\nexactMath.sub('100', '5', { returnString: false }); //95\r\nexactMath.round(2.22, -1, { returnString: true }); //'2.2'\r\nexactMath.pow(3, 3, { returnString: true }) //'27'\r\n```\r\n\r\n##### The config `decimalChar` property usage\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nexactMath.add('5.55', '3,33'); //8.88\r\nexactMath.sub('5.55', '3,33', { decimalChar: ['.', ','] }); //2.22\r\n\r\nexactMath.mul('5.55', '3,33', { decimalChar: '.' }); //[Error]: Incorrect argument [1]. The [String] argument is not a valid numerical value.\r\nexactMath.formula('5.55 + 3,33', { decimalChar: ',' }) //[Error]: The [String] formula contains illegal character .\r\n```\r\n\r\n##### The config `divChar` property usage\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nexactMath.formula('(6÷2)*(4/2)*(9:.5)'); //108\r\nexactMath.formula('(6÷2)*(4/2)*(9:.5)', { divChar: ['÷', ':', '/'] }); //108\r\nexactMath.formula('(6÷2)*(4/2)*(9:.5)', { divChar: [':', '÷'] }); //[Error]: The [String] formula contains illegal character /\r\nexactMath.formula('10/2', { divChar: ['/'] }); //5\r\nexactMath.formula('10÷2', { divChar: ['÷'] }); //5\r\n```\r\n\r\n##### The config `mulChar` property usage\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nexactMath.formula('5*5 + 5x5 + 5⋅5 + 5×5'); //100\r\nexactMath.formula('5*5 + 5x5 + 5⋅5 + 5×5', { mulChar: ['*', 'x', '⋅', '×'] }); //100\r\nexactMath.formula('5*5 + 5x5 + 5⋅5 + 5×5', { mulChar: ['x'] }); //[Error]: The [String] formula contains illegal character *\r\nexactMath.formula('5*5', { mulChar: '*' }); //25\r\nexactMath.formula('5*5 + 5⋅5', { mulChar: ['*', '⋅'] }); //50\r\n```\r\n\r\n##### The config `ePlus` and `eMinus` properties usage\r\n```javascript\r\nconst exactMath = require('exact-math');\r\n\r\nexactMath.add('1005000000000','4400000000000000000000000', { returnString: true }); //'4400000000001005e+9'\r\nexactMath.add('0.0000000000000001','0.000000000000000000001', { returnString: true }); //'1.00001e-16'\r\nexactMath.sub('0.0000012',0.000023, { returnString: true }); //'-2.18e-5'\r\nexactMath.mul(0.000005,0.000005, { returnString: true }); //'2.5e-11'\r\nexactMath.formula('1e+5*1e+5*1e+5*1e+5', { returnString: true }); //'1e+20'\r\nexactMath.formula('1/10000000', { returnString: true }); //'1e-7'\r\n\r\nexactMath.add('5000', 5000, { returnString: true, ePlus: 0 }); //'1e+4'\r\nexactMath.mul(200,400,600,800,1000,1200,1400,1600, { returnString: true, ePlus: 25 }); //'103219200000000000000000'\r\n\r\nexactMath.div(1, 10e+10, { returnString: true, eMinus: 0 }); //'1e-11'\r\nexactMath.formula('6(.2*.15)/1000+2/2000*.00000022', { returnString: true, eMinus: 12 }); //'0.00018000022'\r\nexactMath.pow(0.3, 20, { returnString: true, eMinus: 0 }); //'3.486784401e-11'\r\nexactMath.pow(0.3, 20, { returnString: true, eMinus: 21 }); //'0.00000000003486784401'\r\n\r\nexactMath.add('200000','500000000000','10000000000000000','62000000000000000000000000000000', { returnString: true, ePlus: Infinity }); //'62000000000000010000500000200000'\r\nexactMath.pow(0.037, 17, { returnString: true, eMinus: Infinity }); //'0.000000000000000000000000456487940826035155404146917'\r\n```\r\n\r\n##### The config `maxDecimal` property usage\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nexactMath.div(16.22, 7.77, { returnString: true }); //'2.08751608751608752'\r\nexactMath.div(16.22, 7.77, { returnString: true, maxDecimal: 5 }); //'2.08752'\r\nexactMath.div(16.22, 7.77, { returnString: true, maxDecimal: 25 }); //'2.0875160875160875160875161'\r\nexactMath.formula('2/3.33+2/3.33', { returnString: true}); //'1.2012012012012012'\r\nexactMath.formula('2/3.33+2/3.33', { returnString: true, maxDecimal: 1 }); //'1.2'\r\nexactMath.formula('2/3.33+2/3.33', { returnString: true, naxDecimal: 30}); //'1.201201201201201201201201201202'\r\n```\r\n\r\n##### The config `divideByZeroError` property usage\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nconst config = { divideByZeroError: false };\r\n\r\nexactMath.div(0, 0); //NaN\r\nexactMath.formula('2/0'); //NaN\r\nexactMath.div(55, 0, 2.5, config); //NaN\r\nexactMath.formula('2*(9/(2-2))', config); //NaN\r\n```\r\n\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nconst config = { divideByZeroError: true };\r\n\r\nexactMath.div(55, 0, 2.5, config); //[Error]: Incorrect argument [1]. The division by zero is not allowed.\r\nexactMath.formula('2*(9/(2-2))', config); //[Error]: Invalid '(9/(2-2))' expression. The division by zero is not allowed.\r\nexactMath.div(55, 0, 2.5, config, (o)=>{\r\n  console.log(o.number); //NaN\r\n  console.error(o.error); //[Error]: Incorrect argument [1]. The division by zero is not allowed.\r\n}); \r\n```\r\n\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nconst customError = new Error('Division by zero.');\r\nconst config = { divideByZeroError: customError };\r\n\r\nexactMath.div(55, 0, 2.5, config); //[Error]: Division by zero.\r\nexactMath.formula('2*(9/(2-2))', config); //[Error]: Division by zero.\r\nexactMath.div(55, 0, 2.5, config, (o)=>{\r\n  console.log(o.number); //NaN\r\n  console.error(o.error); //[Error]: Division by zero.\r\n}); \r\n```\r\n\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nconst config = {\r\n  divideByZeroError: ({ list }) => {\r\n    if(list[0] != 0) return Infinity;\r\n    else return NaN;\r\n  }\r\n};\r\n\r\nconsole.log(exactMath.div(0, 0, config)); //NaN\r\nconsole.log(exactMath.div(0, 1, config)); //0\r\nconsole.log(exactMath.div(1, 0, config)); //Infinity\r\n```\r\n\r\n##### The config `invalidError` property usage\r\n\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nexactMath.add(Infinity, 5); //[TypeError]: Incorrect argument [0]. The argument cannot be an Infinity or -Infinity value.\r\nexactMath.add(Infinity, 5, { invalidError: true}); //[TypeError]: Incorrect argument [0]. The argument cannot be an Infinity or -Infinity value.\r\nexactMath.div(10, NaN); //[TypeError]: Incorrect argument [1]. The argument cannot be a NaN value.\r\nexactMath.div(10, NaN, { invalidError: true}); //[TypeError]: Incorrect argument [1]. The argument cannot be a NaN value.\r\nexactMath.sub(); //[Error]: Set at least two [Number|String] values.\r\nexactMath.pow(2, 2.5); //[Error]: Incorrect argument [1]. The [Number] power exponent positive integer is expected.\r\n```\r\n\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nconst config = { invalidError: false };\r\nexactMath.add(Infinity, 5, config); //NaN\r\nexactMath.div(10, NaN, config); //NaN\r\nexactMath.formula('hello world', config); //NaN\r\n```\r\n\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nconst customError = new Error('Some error message.');\r\nconst config = { invalidError: customError };\r\n\r\nexactMath.add(Infinity, 5, config); //[Error]: Some error message.\r\nexactMath.div(10, NaN, config); //[Error]: Some error message.\r\nexactMath.formula('hello world', config); //[Error]: Some error message.\r\n```\r\n\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nconst config = {\r\n  invalidError: ({ error, index, list, callback }) => {\r\n    throw error; //the default error\r\n  }\r\n};\r\n\r\nexactMath.formula('2 * (4/12', config);\r\nexactMath.div('6.66', '5..3', config);\r\n```\r\n\r\n##### The config `trim` property usage\r\n```javascript\r\nconst exactMath = require('exact-math');\r\nconst config = {\r\n  returnString: true,\r\n  trim: false\r\n};\r\n\r\nexactMath.round(44, -3, config); //44.000\r\nexactMath.round(.00015, -3, config); //0.000\r\nexactMath.round(.22, -5, config); //0.22000\r\nexactMath.round(.222, -1, config); //0.2\r\n```\r\n\r\n\r\n##### The `callback` property usage\r\n```javascript\r\nconst exactMath = require('exact-math');\r\n\r\nexactMath.add(NaN, 10, '3', ({ error, number, string }) => {\r\n  if(error) throw error; //[TypeError]: Incorrect argument [0]. The argument cannot be a NaN value.\r\n})\r\n\r\nexactMath.mul('236452e3', '2.22', ({ error, number, string }) => {\r\n  const result = exactMath.div(string, 10);\r\n})\r\n\r\nexactMath.formula('17/4.44', { maxDecimal: 30 }, ({error, number, string})=>{\r\n  console.log(error); //null\r\n  console.log(number); //3.828828828828829\r\n  console.log(string); //'3.828828828828828828828828828829'\r\n});\r\n```\r\n","maintainers":[{"name":"devrafalko","email":"dev.rafalko@gmail.com"}],"time":{"modified":"2022-06-17T21:45:25.766Z","created":"2017-06-01T01:19:56.517Z","1.0.0":"2017-06-01T01:19:56.517Z","2.0.0":"2018-11-21T02:16:56.436Z","2.0.1":"2019-05-27T18:11:29.495Z","2.1.0":"2019-07-03T14:54:57.035Z","2.1.2":"2019-08-22T18:44:32.387Z","2.1.3":"2020-04-25T10:00:24.455Z","2.2.0":"2020-05-16T16:02:34.652Z","2.2.1":"2020-09-05T18:08:10.506Z","2.2.2":"2020-09-05T18:48:04.518Z","2.2.3":"2020-10-18T17:00:39.551Z"},"homepage":"https://github.com/devrafalko/exact-math#readme","keywords":["math","floating","point","precision","problem","IEEE","754","arithmetic","calculation","addition","subtraction","multiplication","division","add","subtract","multiply","divide","round","rounding","ceil","ceiling","floor","flooring","power","formula","parentheses","result","big","integer","safe"],"repository":{"type":"git","url":"git+https://github.com/devrafalko/exact-math.git"},"author":{"name":"Paweł Rafałko","email":"dev.rafalko@gmail.com"},"bugs":{"url":"https://github.com/devrafalko/exact-math/issues"},"license":"MIT","readmeFilename":"README.md"}