{"_id":"goodmath","name":"goodmath","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"goodmath","version":"1.0.0","description":"numers are array for more bigger number","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/leblanmonster/bettermath.git"},"bugs":{"url":"https://github.com/leblanmonster/bettermath/issues"},"keywords":["math","goodmath"],"homepage":"https://github.com/leblanmonster/bettermath#readme","author":{"name":"leblan","url":"c"},"license":"MIT","_id":"goodmath@1.0.0","gitHead":"e8a1bf8169305d5e63950d78c594743a6afa6c3e","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-cHxa+djOfdrnkMK3tDH1SKzEPCwvLkMLIXoHT/CBLJ/fOvUGsMzT3WFkYT1eX+0vYN5mGbobHU4o78eeZDpGQw==","shasum":"64839a255b86da20a2828bafd407e265dcebcfa0","tarball":"https://registry.npmjs.org/goodmath/-/goodmath-1.0.0.tgz","fileCount":4,"unpackedSize":9517,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFscnpBypMKj8ldIT9CgyG0T7ZkM4MVgFfTYPxK16TC0AiBaDvUZHpyEcFphjEpgGX9fzuvoZU1129cZWF2zKUIdqA=="}]},"_npmUser":{"name":"tobi226","email":"tobi226@proton.me"},"directories":{},"maintainers":[{"name":"tobi226","email":"tobi226@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/goodmath_1.0.0_1775584166869_0.4106715099468379"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-07T17:49:26.774Z","1.0.0":"2026-04-07T17:49:27.000Z","modified":"2026-04-07T17:49:27.200Z"},"maintainers":[{"name":"tobi226","email":"tobi226@proton.me"}],"description":"numers are array for more bigger number","homepage":"https://github.com/leblanmonster/bettermath#readme","keywords":["math","goodmath"],"repository":{"type":"git","url":"git+https://github.com/leblanmonster/bettermath.git"},"author":{"name":"leblan","url":"c"},"bugs":{"url":"https://github.com/leblanmonster/bettermath/issues"},"license":"MIT","readme":"# goodmath\n\n## introduction\n\nthe safer integer in js is 9007199254740991.\n\nwe can see this number big but I was limited for my [RSA](https://www.npmjs.com/package/asimplersa) system.\nSo I've reinvent the number in js:\nnumber are array.\nEach numberarray are compose like this\n\n```js\n// realnumber:\nlet mynum = 23;\n// arraynumber:\nlet mynum = [3, 2];\n```\n\nthe number are reverst because it's more easier to manipuling this.\nBut don't worry using the transform and intoString methods you havn't to read inverse Array of number\n\n## example\n\n```js\nconst goodmath = require(\"goodmath\");\nlet num1 = goodmath.transform(9007199254740991);\nlet num2 = goodmath.add(num1, goodmath.transform(1) /* or [1]*/);\nconsole.log(goodmath.intoString(num2)); // return 9007199254740992\nconsole.log(goodmath.isEqual(num1, num2)); // return false\n```\n\n## docs\n\n### .transform\n\nreturn a Array\n\ntransform number in to Array\nex:\n\n```js\ngoodmath.transform(45); // return [5, 4]\n```\n\n### .add\n\nreturn an Array\n\nadd tu Arraynumber\nex:\n\n```js\ngoodmath.add([5, 4], (5, 4)); // returnn [0, 9]\n```\n\n### .intoString\n\nreturn a String\n\ntransform Arraynumber in String\nex:\n\n```js\ngoodmath.intoString([5, 4]); // return 45\n```\n\n### .intoNumber\n\nexactly like intoString but it's return Number can be NaN and Infinite\n\n### .isInferieur .isSuperieur .isEqual\n\nfor compare to Arraynumber\n\nreturn boolean\nex:\n\n```js\ngoodmath.isEqual([5, 4], [5, 4]); // return true\n```\n\n### .reduce\n\nreduce Arraynumber with 0 useless\n\nreturn an Array\n\n```js\ngoodmath.reduce([1, 0]); // return [1]\n```\n\n### .sub\n\nsubstract 2 Arraynumber\n\nreturn an Array\nex:\n\n```js\ngoodmath.sub([5, 4], [1]); // return [4, 4]\n```\n\n### .mul\n\nmultiply 2 Arraynumber\n\nreturn an Array\nex:\n\n```js\ngoodmath.mul([2], [3]); // return 6\n```\n\n### .div\n\ndivide to number (euclidienne)\n\nreturn an object like this `{result:[x], modulo:[x]}`\nex:\n\n```js\ngoodmath.div([4], [3]); // return {result: [1], modulo:[1]}\n```\n\n# WARNING this project accept juste positive and not comma number\n\nif you want to add somthing to the project go on github and good luck because this are brainfuck.\n","readmeFilename":"README.md","_rev":"1-a55263412699d4c333b83785fcd2f7bb"}