{"_id":"@breezewhite_yo/apcn","_rev":"3-fea1eba21542b9cb6089e6ce7a5670b4","name":"@breezewhite_yo/apcn","dist-tags":{"latest":"0.3.1"},"versions":{"0.2.0":{"name":"@breezewhite_yo/apcn","version":"0.2.0","license":"MIT","_id":"@breezewhite_yo/apcn@0.2.0","maintainers":[{"name":"breezewhite_yo","email":"miyashita2010@tuta.io"}],"homepage":"https://github.com/BreezeWhite/apcn-rs#readme","bugs":{"url":"https://github.com/BreezeWhite/apcn-rs/issues"},"dist":{"shasum":"0957321d31e9c4b1ab340089aec918aa34e5fb60","tarball":"https://registry.npmjs.org/@breezewhite_yo/apcn/-/apcn-0.2.0.tgz","fileCount":6,"integrity":"sha512-MtMrkFqmsB6p2rDphc5uFii4GSaxBLzVZ+W6YDdjkt1QoRrN7wyxy1W9+WpiGqH3F382OnbeAqp6Q0uGaIIgmA==","signatures":[{"sig":"MEQCIBkiT85Ej/c4BNWNEpY0CF2YxTcmb1pM83IMnaiwm8EcAiA0UWUWrw0098oBoRGyvF6hPpBVakV3LsNZDw6/Jb0yPA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":217212},"main":"apcn.js","type":"module","types":"apcn.d.ts","gitHead":"a9406383e9857059bf0705112e5b7876dd06d891","_npmUser":{"name":"breezewhite_yo","email":"miyashita2010@tuta.io"},"repository":{"url":"git+https://github.com/BreezeWhite/apcn-rs.git","type":"git"},"_npmVersion":"11.17.0","description":"Arbitrary Precision Constant Numbers (apcn) calculation written in Rust.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"26.4.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/apcn_0.2.0_1782446082199_0.4978464830657978","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@breezewhite_yo/apcn","version":"0.3.0","license":"MIT","_id":"@breezewhite_yo/apcn@0.3.0","maintainers":[{"name":"breezewhite_yo","email":"miyashita2010@tuta.io"}],"homepage":"https://github.com/BreezeWhite/apcn-rs#readme","bugs":{"url":"https://github.com/BreezeWhite/apcn-rs/issues"},"dist":{"shasum":"34c160871c5bc174d03f114bbcbf59e9783de480","tarball":"https://registry.npmjs.org/@breezewhite_yo/apcn/-/apcn-0.3.0.tgz","fileCount":6,"integrity":"sha512-eh+IMJG/+0epMcOOejfKHXdoiXKfQ0jGHvK9L1cxCSKjINf1E/jRBcS7+EuABr85mAYXRlRewoJEaII8AgOpLw==","signatures":[{"sig":"MEYCIQDmoJ6D3VKJCBxF2XeIE2Noxn5PfV6PaQ5nf4Ha1d71XgIhAMEwCVeA08Kr8RydtKHj5VjCJtNIEK6JanR4tG3CGlG0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":227908},"main":"apcn.js","type":"module","types":"apcn.d.ts","gitHead":"1ba9818dcb5c2876d5d9d4ad2135dfb86c520e1b","_npmUser":{"name":"breezewhite_yo","email":"miyashita2010@tuta.io"},"repository":{"url":"git+https://github.com/BreezeWhite/apcn-rs.git","type":"git"},"_npmVersion":"11.17.0","description":"Arbitrary Precision Constant Numbers (apcn) calculation written in Rust.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"26.4.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/apcn_0.3.0_1782562172374_0.6300200102214275","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@breezewhite_yo/apcn","type":"module","description":"Arbitrary Precision Constant Numbers (apcn) calculation written in Rust.","version":"0.3.1","license":"MIT","repository":{"type":"git","url":"git+https://github.com/BreezeWhite/apcn-rs.git"},"main":"apcn.js","types":"apcn.d.ts","sideEffects":["./snippets/*"],"gitHead":"6bf372f179919a1e954cfdc6ba395f276d012cf6","_id":"@breezewhite_yo/apcn@0.3.1","bugs":{"url":"https://github.com/BreezeWhite/apcn-rs/issues"},"homepage":"https://github.com/BreezeWhite/apcn-rs#readme","_nodeVersion":"26.4.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-XLBAMYBifEfEJoQRqCKNUtaxzwd4+nXvG0A5kuygAwaZDLk9u4hvsYjGnRNcqy5PcLsUyNFyZGoZplg8pdLZvA==","shasum":"9ca21f7cc987f7f4dfc02dacf4033ba11e12a00d","tarball":"https://registry.npmjs.org/@breezewhite_yo/apcn/-/apcn-0.3.1.tgz","fileCount":6,"unpackedSize":227908,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIG7vz4f0fwjOVC+ha+ZmW8kdpZRqm7vy40U/DrMx95njAiBChwHrBQAMm2Vi+oEQjnHO5tqCa9REmxOrHrfCXmH8eg=="}]},"_npmUser":{"name":"breezewhite_yo","email":"miyashita2010@tuta.io"},"directories":{},"maintainers":[{"name":"breezewhite_yo","email":"miyashita2010@tuta.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/apcn_0.3.1_1782562598405_0.26529144666993565"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-26T03:54:42.096Z","modified":"2026-06-27T12:16:38.715Z","0.2.0":"2026-06-26T03:54:42.461Z","0.3.0":"2026-06-27T12:09:32.543Z","0.3.1":"2026-06-27T12:16:38.588Z"},"bugs":{"url":"https://github.com/BreezeWhite/apcn-rs/issues"},"license":"MIT","homepage":"https://github.com/BreezeWhite/apcn-rs#readme","repository":{"type":"git","url":"git+https://github.com/BreezeWhite/apcn-rs.git"},"description":"Arbitrary Precision Constant Numbers (apcn) calculation written in Rust.","maintainers":[{"name":"breezewhite_yo","email":"miyashita2010@tuta.io"}],"readme":"# @breezewhite_yo/apcn — Arbitrary Precision Constant Numbers (WASM)\n\n[![npm version](https://img.shields.io/npm/v/@breezewhite_yo/apcn.svg)](https://www.npmjs.com/package/@breezewhite_yo/apcn)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\nAn extremely fast mathematical constant calculator compiled to WebAssembly (WASM). Compute constants like $\\pi$ or $e$ to thousands of decimal digits directly in modern browsers and JavaScript/TypeScript environments with blazing-fast speed.\n\nThis package wraps the Rust `apcn` crate, using the pure-Rust `dashu` arbitrary-precision backend for complete compatibility and zero external system dependencies.\n\n---\n\n## Installation\n\nInstall the package via npm:\n\n```bash\nnpm install @breezewhite_yo/apcn\n```\n\n---\n\n## Quick Start (Browser ES Modules)\n\n```html\n<!doctype html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"utf-8\" />\n    <title>apcn WASM Example</title>\n</head>\n<body>\n    <script type=\"module\">\n        import init, { compute_pi, ln, sqrt } from \"./node_modules/@breezewhite_yo/apcn/apcn.js\";\n\n        async function run() {\n            // Initialize the WebAssembly module\n            await init();\n\n            // Calculate Pi to 10,000 decimal places\n            const pi10k = compute_pi(10000);\n            console.log(\"Pi (first 50 digits):\", pi10k.slice(0, 52));\n\n            // Calculate natural logarithm of 2 to 100 decimal places\n            const ln2 = ln(2.0, 100);\n            console.log(\"ln(2):\", ln2);\n\n            // Calculate the square root of 5 to 50 decimal places\n            const sqrt5 = sqrt(5, 50);\n            console.log(\"sqrt(5):\", sqrt5);\n        }\n\n        run().catch(console.error);\n    </script>\n</body>\n</html>\n```\n\n---\n\n## API Reference\n\nThe WASM module exports the following functions. All precision values `prec` represent the requested number of digits **after** the decimal point.\n\n### `compute_pi(prec: number): string`\nComputes the value of $\\pi$ (Pi) using the Chudnovsky algorithm.\n- **`prec`**: Number of decimal places after the decimal point.\n\n### `compute_e(prec: number): string`\nComputes the value of $e$ (Euler's number) using Taylor series expansion.\n- **`prec`**: Number of decimal places after the decimal point.\n\n### `compute_sqrt2(prec: number): string`\nComputes the value of $\\sqrt{2}$ (Square root of 2) using the Newton-Raphson method.\n- **`prec`**: Number of decimal places after the decimal point.\n\n### `sqrt(x: number, prec: number): string`\nComputes the value of $\\sqrt{x}$ (Square root of an integer $x$) using the Newton-Raphson method.\n- **`x`**: Input integer.\n- **`prec`**: Number of decimal places after the decimal point.\n\n### `ln(x: number, prec: number): string`\nComputes the value of $\\ln(x)$ (Natural logarithm of a float $x$).\n- **`x`**: Input floating-point value.\n- **`prec`**: Number of decimal places after the decimal point.\n\n### `compute_ln2(prec: number): string`\nComputes the value of $\\ln(2)$ (Natural logarithm of 2).\n- **`prec`**: Number of decimal places after the decimal point.\n\n### `compute_phi(prec: number): string`\nComputes the value of $\\phi$ (Golden Ratio) using Fibonacci/Direct formula.\n- **`prec`**: Number of decimal places after the decimal point.\n\n---\n\n## License\n\nLicensed under the MIT License.\n","readmeFilename":"README.md"}