{"name":"@stdlib/complex","version":"0.2.0","description":"Complex numbers.","license":"Apache-2.0","author":{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"},"contributors":[{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"}],"main":"lib/index.js","directories":{"doc":"./docs","example":"./examples","lib":"./lib","test":"./test"},"types":"./docs/types","scripts":{"test":"make test","test-cov":"make test-cov","examples":"make examples","benchmark":"make benchmark"},"homepage":"https://stdlib.io","repository":{"type":"git","url":"git://github.com/stdlib-js/complex.git"},"bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"dependencies":{"@stdlib/array":"^0.2.0","@stdlib/assert":"^0.1.1","@stdlib/number":"^0.1.1","@stdlib/string":"^0.1.1","@stdlib/types":"^0.2.0","@stdlib/utils":"^0.1.1"},"devDependencies":{"@stdlib/bench":"^0.2.1","@stdlib/constants":"^0.1.1","@stdlib/math":"^0.1.1","@stdlib/random":"^0.1.1","tape":"git+https://github.com/kgryte/tape.git#fix/globby","istanbul":"^0.4.1","tap-min":"git+https://github.com/Planeshifter/tap-min.git"},"engines":{"node":">=0.10.0","npm":">2.7.0"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"keywords":["stdlib","stdtypes","types","complex","cmplx","number","namespace","ns"],"funding":{"type":"opencollective","url":"https://opencollective.com/stdlib"},"gitHead":"18c250220e23aa825b05ec5898927ea6b261ca43","_id":"@stdlib/complex@0.2.0","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-wPFNf+clgJYKv+oRpkXNvY8gc4ZDifn+TdrKfR42Muq3w6PDmSij5IyD03thDxbJniGK6Fgv0Dgmb5ValtBRow==","shasum":"76c11443e996de4771c40e73eb2767af8205ccd7","tarball":"http://registry-npm.ywwl.com/@stdlib/complex/download/@stdlib/complex-0.2.0.tgz","fileCount":282,"unpackedSize":725930,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF2iz6rrEauykBU1BEh401Di5RQC66qbvjQuhSWcnf8OAiBm8ToMla3bfMM2CZpOm8kY7DH7JygB9vfVuQO8v252yQ=="}],"size":66030,"noattachment":false,"key":"/@stdlib/complex/-/@stdlib/complex-0.2.0.tgz"},"_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"maintainers":[{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},{"name":"kgryte","email":"kgryte@gmail.com"},{"name":"planeshifter","email":"pgb@andrew.cmu.edu"},{"name":"rreusser","email":"rsreusser@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/complex_0.2.0_1707102220811_0.03742001311897192"},"_hasShrinkwrap":false,"readme":"<!--\n\n@license Apache-2.0\n\nCopyright (c) 2018 The Stdlib Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n-->\n\n\n<details>\n  <summary>\n    About stdlib...\n  </summary>\n  <p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>\n  <p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>\n  <p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>\n  <p>To join us in bringing numerical computing to the web, get started by checking us out on <a href=\"https://github.com/stdlib-js/stdlib\">GitHub</a>, and please consider <a href=\"https://opencollective.com/stdlib\">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>\n</details>\n\n# Complex Numbers\n\n[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->\n\n> Complex number data types.\n\n<section class=\"installation\">\n\n## Installation\n\n```bash\nnpm install @stdlib/complex\n```\n\n</section>\n\n<section class=\"usage\">\n\n## Usage\n\n```javascript\nvar ns = require( '@stdlib/complex' );\n```\n\n#### ns\n\nComplex number data types.\n\n```javascript\nvar o = ns;\n// returns {...}\n```\n\nThe namespace constains complex number constructors.\n\n<!-- <toc keywords=\"+data, +structure, +types\"> -->\n\n<div class=\"namespace-toc\">\n\n-   <span class=\"signature\">[`base`][@stdlib/complex/base]</span><span class=\"delimiter\">: </span><span class=\"description\">base (i.e., lower-level) complex number functions.</span>\n-   <span class=\"signature\">[`complex( real, imag[, dtype] )`][@stdlib/complex/cmplx]</span><span class=\"delimiter\">: </span><span class=\"description\">create a complex number.</span>\n-   <span class=\"signature\">[`complexCtors( dtype )`][@stdlib/complex/ctors]</span><span class=\"delimiter\">: </span><span class=\"description\">complex number constructors.</span>\n-   <span class=\"signature\">[`complexDataType( value )`][@stdlib/complex/dtype]</span><span class=\"delimiter\">: </span><span class=\"description\">return the data type of a complex number.</span>\n-   <span class=\"signature\">[`complexDataTypes()`][@stdlib/complex/dtypes]</span><span class=\"delimiter\">: </span><span class=\"description\">list of complex number data types.</span>\n-   <span class=\"signature\">[`Complex64( real, imag )`][@stdlib/complex/float32]</span><span class=\"delimiter\">: </span><span class=\"description\">64-bit complex number.</span>\n-   <span class=\"signature\">[`Complex128( real, imag )`][@stdlib/complex/float64]</span><span class=\"delimiter\">: </span><span class=\"description\">128-bit complex number.</span>\n-   <span class=\"signature\">[`complexPromotionRules( [dtype1, dtype2] )`][@stdlib/complex/promotion-rules]</span><span class=\"delimiter\">: </span><span class=\"description\">return the complex number data type with the smallest size and closest \"kind\" to which data types can be **safely** cast.</span>\n\n</div>\n\n<!-- </toc> -->\n\n```javascript\nvar z = ns.complex( 5.0, 3.0 );\n// returns <Complex128>\n\nvar str = z.toString();\n// returns '5 + 3i'\n\nz = ns.complex( 5.0, 3.0, 'float32' );\n// returns <Complex64>\n\nz = new ns.Complex64( 5.0, 3.0 );\n// returns <Complex64>\n```\n\nIn addition, the namespace contains the following functions:\n\n<!-- <toc keywords=\"-data, -structure, -types\"> -->\n\n<div class=\"namespace-toc\">\n\n-   <span class=\"signature\">[`conj( z )`][@stdlib/complex/conj]</span><span class=\"delimiter\">: </span><span class=\"description\">return the complex conjugate of a double-precision complex floating-point number.</span>\n-   <span class=\"signature\">[`conjf( z )`][@stdlib/complex/conjf]</span><span class=\"delimiter\">: </span><span class=\"description\">return the complex conjugate of a single-precision complex floating-point number.</span>\n-   <span class=\"signature\">[`imag( z )`][@stdlib/complex/imag]</span><span class=\"delimiter\">: </span><span class=\"description\">return the imaginary component of a double-precision complex floating-point number.</span>\n-   <span class=\"signature\">[`imagf( z )`][@stdlib/complex/imagf]</span><span class=\"delimiter\">: </span><span class=\"description\">return the imaginary component of a single-precision complex floating-point number.</span>\n-   <span class=\"signature\">[`real( z )`][@stdlib/complex/real]</span><span class=\"delimiter\">: </span><span class=\"description\">return the real component of a double-precision complex floating-point number.</span>\n-   <span class=\"signature\">[`realf( z )`][@stdlib/complex/realf]</span><span class=\"delimiter\">: </span><span class=\"description\">return the real component of a single-precision complex floating-point number.</span>\n-   <span class=\"signature\">[`reim( z )`][@stdlib/complex/reim]</span><span class=\"delimiter\">: </span><span class=\"description\">return the real and imaginary components of a double-precision complex floating-point number.</span>\n-   <span class=\"signature\">[`reimf( z )`][@stdlib/complex/reimf]</span><span class=\"delimiter\">: </span><span class=\"description\">return the real and imaginary components of a single-precision complex floating-point number.</span>\n-   <span class=\"signature\">[`reviveComplex64( key, value )`][@stdlib/complex/reviver-float32]</span><span class=\"delimiter\">: </span><span class=\"description\">revive a JSON-serialized 64-bit complex number.</span>\n-   <span class=\"signature\">[`reviveComplex128( key, value )`][@stdlib/complex/reviver-float64]</span><span class=\"delimiter\">: </span><span class=\"description\">revive a JSON-serialized 128-bit complex number.</span>\n-   <span class=\"signature\">[`reviveComplex( key, value )`][@stdlib/complex/reviver]</span><span class=\"delimiter\">: </span><span class=\"description\">revive a JSON-serialized complex number.</span>\n\n</div>\n\n<!-- </toc> -->\n\n```javascript\nvar z = ns.complex( 5.0, 3.0 );\nvar str = z.toString();\n// returns '5 + 3i'\n\nvar v = ns.conj( z );\nstr = v.toString();\n// returns '5 - 3i'\n```\n\n</section>\n\n<!-- /.usage -->\n\n<section class=\"examples\">\n\n## Examples\n\n<!-- TODO: better examples -->\n\n<!-- eslint no-undef: \"error\" -->\n\n```javascript\nvar objectKeys = require( '@stdlib/utils/keys' );\nvar ns = require( '@stdlib/complex' );\n\nconsole.log( objectKeys( ns ) );\n```\n\n</section>\n\n<!-- /.examples -->\n\n<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->\n\n<section class=\"related\">\n\n</section>\n\n<!-- /.related -->\n\n<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->\n\n\n<section class=\"main-repo\" >\n\n* * *\n\n## Notice\n\nThis package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.\n\nFor more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib].\n\n#### Community\n\n[![Chat][chat-image]][chat-url]\n\n---\n\n## License\n\nSee [LICENSE][stdlib-license].\n\n\n## Copyright\n\nCopyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].\n\n</section>\n\n<!-- /.stdlib -->\n\n<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->\n\n<section class=\"links\">\n\n[npm-image]: http://img.shields.io/npm/v/@stdlib/complex.svg\n[npm-url]: https://npmjs.org/package/@stdlib/complex\n\n[test-image]: https://github.com/stdlib-js/complex/actions/workflows/test.yml/badge.svg?branch=v0.2.1\n[test-url]: https://github.com/stdlib-js/complex/actions/workflows/test.yml?query=branch:v0.2.1\n\n[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/complex/main.svg\n[coverage-url]: https://codecov.io/github/stdlib-js/complex?branch=main\n\n<!--\n\n[dependencies-image]: https://img.shields.io/david/stdlib-js/complex.svg\n[dependencies-url]: https://david-dm.org/stdlib-js/complex/main\n\n-->\n\n[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg\n[chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im\n\n[stdlib]: https://github.com/stdlib-js/stdlib\n\n[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors\n\n[umd]: https://github.com/umdjs/umd\n[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules\n\n[deno-url]: https://github.com/stdlib-js/complex/tree/deno\n[deno-readme]: https://github.com/stdlib-js/complex/blob/deno/README.md\n[umd-url]: https://github.com/stdlib-js/complex/tree/umd\n[umd-readme]: https://github.com/stdlib-js/complex/blob/umd/README.md\n[esm-url]: https://github.com/stdlib-js/complex/tree/esm\n[esm-readme]: https://github.com/stdlib-js/complex/blob/esm/README.md\n[branches-url]: https://github.com/stdlib-js/complex/blob/main/branches.md\n\n[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/complex/main/LICENSE\n\n<!-- <toc-links> -->\n\n[@stdlib/complex/conj]: https://github.com/stdlib-js/complex/tree/main/conj\n\n[@stdlib/complex/conjf]: https://github.com/stdlib-js/complex/tree/main/conjf\n\n[@stdlib/complex/imag]: https://github.com/stdlib-js/complex/tree/main/imag\n\n[@stdlib/complex/imagf]: https://github.com/stdlib-js/complex/tree/main/imagf\n\n[@stdlib/complex/real]: https://github.com/stdlib-js/complex/tree/main/real\n\n[@stdlib/complex/realf]: https://github.com/stdlib-js/complex/tree/main/realf\n\n[@stdlib/complex/reim]: https://github.com/stdlib-js/complex/tree/main/reim\n\n[@stdlib/complex/reimf]: https://github.com/stdlib-js/complex/tree/main/reimf\n\n[@stdlib/complex/reviver-float32]: https://github.com/stdlib-js/complex/tree/main/reviver-float32\n\n[@stdlib/complex/reviver-float64]: https://github.com/stdlib-js/complex/tree/main/reviver-float64\n\n[@stdlib/complex/reviver]: https://github.com/stdlib-js/complex/tree/main/reviver\n\n[@stdlib/complex/base]: https://github.com/stdlib-js/complex/tree/main/base\n\n[@stdlib/complex/cmplx]: https://github.com/stdlib-js/complex/tree/main/cmplx\n\n[@stdlib/complex/ctors]: https://github.com/stdlib-js/complex/tree/main/ctors\n\n[@stdlib/complex/dtype]: https://github.com/stdlib-js/complex/tree/main/dtype\n\n[@stdlib/complex/dtypes]: https://github.com/stdlib-js/complex/tree/main/dtypes\n\n[@stdlib/complex/float32]: https://github.com/stdlib-js/complex/tree/main/float32\n\n[@stdlib/complex/float64]: https://github.com/stdlib-js/complex/tree/main/float64\n\n[@stdlib/complex/promotion-rules]: https://github.com/stdlib-js/complex/tree/main/promotion-rules\n\n<!-- </toc-links> -->\n\n</section>\n\n<!-- /.links -->\n","publish_time":1707102221020,"_cnpm_publish_time":1707102221020,"dist-tags":{"latest":"0.4.1"}}