{"_id":"@abw/badger-maths","name":"@abw/badger-maths","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@abw/badger-maths","version":"0.0.1","type":"module","types":"./dist/index.d.ts","main":"dist/badger-maths.umd.cjs","module":"dist/badger-maths.js","exports":{".":{"require":"./dist/badger-maths.umd.cjs","import":{"types":"./dist/index.d.ts","default":"./dist/badger-maths.js"}}},"author":{"name":"Andy Wardley"},"license":"MIT","homepage":"https://badgerpower.com/badger-maths/","repository":{"type":"git","url":"git+https://github.com/abw/badger-maths.git"},"bugs":{"url":"https://github.com/abw/badger-maths/issues"},"devDependencies":{"@eslint/eslintrc":"^3.2.0","@eslint/js":"^9.17.0","@vitest/coverage-v8":"^2.1.8","@vitest/ui":"^2.1.8","eslint":"^9.17.0","globals":"^15.14.0","typescript":"~5.6.2","typescript-eslint":"^8.18.2","vite":"^6.0.5","vite-plugin-dts":"^4.4.0","vitepress":"^1.5.0","vitest":"^2.1.8"},"dependencies":{"big.js":"^6.2.2"},"scripts":{"dev":"vitepress dev website","preview":"vitepress preview website","build":"$npm_execpath build:lib && $npm_execpath build:docs","build:lib":"tsc && vite build","build:docs":"vitepress build website","test":"vitest --ui --coverage","lint":"eslint 'src/**/*' 'test/**/*'","pretest":"$npm_execpath build:lib"},"description":"This library implements some basic mathematical functions that work around the imprecision in the IEEE 754 standard which Javascript uses for floating point numbers.","_id":"@abw/badger-maths@0.0.1","_integrity":"sha512-leA5NWrOlDV8dhNhp8E0tE0OiwFZNUFhT49LYP3B6v/0cUM5G71ZlBrHR4/YFr0UZnUuen+YGKNB6iEw1NJ9qg==","_resolved":"/private/var/folders/jw/y_b__hgj1n39hh2qgp9s8dnc0000gn/T/6d29d5f99cc09bdce7d1b03de041f44d/abw-badger-maths-0.0.1.tgz","_from":"file:abw-badger-maths-0.0.1.tgz","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-leA5NWrOlDV8dhNhp8E0tE0OiwFZNUFhT49LYP3B6v/0cUM5G71ZlBrHR4/YFr0UZnUuen+YGKNB6iEw1NJ9qg==","shasum":"c57ca8be9ea4d1352291a6d609a21ed29b0cbb97","tarball":"https://registry.npmjs.org/@abw/badger-maths/-/badger-maths-0.0.1.tgz","fileCount":13,"unpackedSize":108732,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkea7K4apC9Ezr9uWT9CEwQyfDObzUz/Hc61VTKiHU0QIhAP9z6tQ4rVXSq6SB2rcLHzvG0oCZkoHNpMyhBCQ5Ia/K"}]},"_npmUser":{"name":"abw","email":"abw@wardley.org"},"directories":{},"maintainers":[{"name":"abw","email":"abw@wardley.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/badger-maths_0.0.1_1735217143009_0.2445006318950811"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-26T12:45:42.857Z","0.0.1":"2024-12-26T12:45:43.237Z","modified":"2024-12-26T12:45:43.586Z"},"maintainers":[{"name":"abw","email":"abw@wardley.org"}],"description":"This library implements some basic mathematical functions that work around the imprecision in the IEEE 754 standard which Javascript uses for floating point numbers.","homepage":"https://badgerpower.com/badger-maths/","repository":{"type":"git","url":"git+https://github.com/abw/badger-maths.git"},"author":{"name":"Andy Wardley"},"bugs":{"url":"https://github.com/abw/badger-maths/issues"},"license":"MIT","readme":"# Badger Maths\n\nThis library implements some basic mathematical functions that work around\nthe imprecision in the IEEE 754 standard which Javascript uses for floating\npoint numbers.\n\nThey were originally written using a fixed floating point algorithm based\non the code in [Sinful.js](https://github.com/guipn/sinful.js).\n\nThey are now implemented as Typescript wrappers around\n[big.js](https://mikemcl.github.io/big.js/).\n\n## Installation\n\nInstall `badger-maths` using your favourite package manager.\n\n### npm\n\n    npm add @abw/badger-maths\n\n### pnpm\n\n    pnpm add @abw/badger-maths\n\n### yarn\n\n    yarn add @abw/badger-maths\n\n## Quick Start\n\nImport the `add`, `subtract`, `multiply` and/or `divide` functions from\n`@abw/badger-maths`.\n\n```js\nimport { add, subtract, multiply, divide } from '@abw/badger-maths'\n```\n\nThen use them to add, subtract, multiple or divide two or more numbers.\n\n```js\nadd(1.1, 6.6, 0.1);         // 1.1 + 6.6 + 0.1 => 7.8\nsubtract(7.8, 0.1, 2.4);    // 7.8 - 0.1 - 2.4 => 5.3\nmultiply(3.0, 2.2, 2.0);    // 3.0 * 2.2 * 2.0 => 13.2\ndivide(13.2, 2.0, 1.1);     // 13.2 / 2.0 / 1.1 => 6\n```\n\n## Documentation\n\nVisit the [website](https://badgerpower.com/badger-maths/) for detailed\ndocumentation.\n\n## Author\n\nAndy Wardley <abw@wardley.org>","readmeFilename":"README.md"}