{"_id":"@stdlib/complex-float64-base-sub","_rev":"2-700e79e09e882fb9f79aece5f736e15a","name":"@stdlib/complex-float64-base-sub","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@stdlib/complex-float64-base-sub","version":"0.1.0","keywords":["stdlib","stdmath","mathematics","math","csubtract","subtract","sub","csub","subtraction","difference","sum","arithmetic","complex","cmplx","number"],"author":{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"},"license":"Apache-2.0","_id":"@stdlib/complex-float64-base-sub@0.1.0","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"}],"contributors":[{"url":"https://github.com/stdlib-js/stdlib/graphs/contributors","name":"The Stdlib Authors"}],"homepage":"https://stdlib.io","bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"dist":{"shasum":"b40b87dc85fd33c3cf6e2b87ae793f7b737bbf4e","tarball":"https://registry.npmjs.org/@stdlib/complex-float64-base-sub/-/complex-float64-base-sub-0.1.0.tgz","fileCount":16,"integrity":"sha512-KmN0jioFATA+Pt+K25Rk2rdNkW9exXaAsfluwWRoTdUhHe70hA+bqpZRDEjVcG6zyMuXTPKF1srlphgE4V+Rtg==","signatures":[{"sig":"MEYCIQDpdbwrEHT8uoTUig9T8juJz7N1bAN5mFbS6TMpO/ICbQIhAMUrwhAW+ZbCIQRqkNef4ZuZzHlTKsHaLbq38eJknnvB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35560},"main":"./lib","types":"./docs/types","engines":{"npm":">2.7.0","node":">=0.10.0"},"funding":{"url":"https://opencollective.com/stdlib","type":"opencollective"},"gitHead":"a9a81afb8d728c9e9d1a79725ae43d4d59f04e35","gypfile":false,"scripts":{},"_npmUser":{"name":"stdlib-bot","email":"kgryte+stdlibbot@gmail.com"},"repository":{"url":"git://github.com/stdlib-js/complex-float64-base-sub.git","type":"git"},"_npmVersion":"10.8.2","description":"Subtract two double-precision complex floating-point numbers.","directories":{"doc":"./docs","lib":"./lib","src":"./src","dist":"./dist","include":"./include"},"_nodeVersion":"20.20.0","dependencies":{"@stdlib/complex-float64-ctor":"^0.0.3","@stdlib/complex-float64-imag":"^0.1.1","@stdlib/complex-float64-real":"^0.1.1","@stdlib/complex-float64-reim":"^0.1.2","@stdlib/math-base-napi-binary":"^0.3.1","@stdlib/utils-library-manifest":"^0.2.3"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/complex-float64-base-sub_0.1.0_1769720479369_0.4390550303382441","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@stdlib/complex-float64-base-sub","version":"0.1.1","description":"Subtract two double-precision complex floating-point 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","gypfile":false,"directories":{"doc":"./docs","include":"./include","lib":"./lib","src":"./src","dist":"./dist"},"types":"./docs/types","scripts":{},"homepage":"https://stdlib.io","repository":{"type":"git","url":"git://github.com/stdlib-js/complex-float64-base-sub.git"},"bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"dependencies":{"@stdlib/complex-float64-ctor":"^0.1.1","@stdlib/complex-float64-imag":"^0.1.2","@stdlib/complex-float64-real":"^0.1.2","@stdlib/complex-float64-reim":"^0.1.3","@stdlib/math-base-napi-binary":"^0.3.3","@stdlib/utils-library-manifest":"^0.2.3"},"devDependencies":{},"engines":{"node":">=0.10.0","npm":">2.7.0"},"os":["aix","darwin","freebsd","linux","macos","openbsd","sunos","win32","windows"],"keywords":["stdlib","stdmath","mathematics","math","csubtract","subtract","sub","csub","subtraction","difference","sum","arithmetic","complex","cmplx","number"],"funding":{"type":"opencollective","url":"https://opencollective.com/stdlib"},"_id":"@stdlib/complex-float64-base-sub@0.1.1","gitHead":"65ac870bcc9363ee25cdde72514d9e0783b5395e","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Lj/J4D1mw8fSFDWldPQ/ZtlIZJCmCUXdoh3DGglQFMdn/pfzCZ3wicI1prYnlTxolryOQ0PTKIrgClVAmKhxdw==","shasum":"68c6645e84f0a9b948f8005f321fc43a263e6562","tarball":"https://registry.npmjs.org/@stdlib/complex-float64-base-sub/-/complex-float64-base-sub-0.1.1.tgz","fileCount":16,"unpackedSize":35560,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCRfCy5xhLFYNMvfkc0laihRzUxIu9ZL9BTYlHmLn4EdgIhAJggYG8eZE5EFDme61y2yUgoFUBipIwGDpfb1ijsAor6"}]},"_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-npm-production","tmp":"tmp/complex-float64-base-sub_0.1.1_1770491003231_0.1354520808718691"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-29T21:01:19.205Z","modified":"2026-02-07T19:03:23.572Z","0.1.0":"2026-01-29T21:01:19.542Z","0.1.1":"2026-02-07T19:03:23.375Z"},"bugs":{"url":"https://github.com/stdlib-js/stdlib/issues"},"author":{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"},"license":"Apache-2.0","homepage":"https://stdlib.io","keywords":["stdlib","stdmath","mathematics","math","csubtract","subtract","sub","csub","subtraction","difference","sum","arithmetic","complex","cmplx","number"],"repository":{"type":"git","url":"git://github.com/stdlib-js/complex-float64-base-sub.git"},"description":"Subtract two double-precision complex floating-point numbers.","contributors":[{"name":"The Stdlib Authors","url":"https://github.com/stdlib-js/stdlib/graphs/contributors"}],"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"}],"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# csub\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> Subtract two double-precision complex floating-point numbers.\n\n<section class=\"intro\">\n\n</section>\n\n<!-- /.intro -->\n\n<section class=\"installation\">\n\n## Installation\n\n```bash\nnpm install @stdlib/complex-float64-base-sub\n```\n\n</section>\n\n<section class=\"usage\">\n\n## Usage\n\n```javascript\nvar csub = require( '@stdlib/complex-float64-base-sub' );\n```\n\n#### csub( z1, z2 )\n\nSubtracts two double-precision complex floating-point numbers.\n\n```javascript\nvar Complex128 = require( '@stdlib/complex-float64-ctor' );\n\nvar z1 = new Complex128( 5.0, 3.0 );\nvar z2 = new Complex128( -2.0, 1.0 );\n\nvar v = csub( z1, z2 );\n// returns <Complex128>[ 7.0, 2.0 ]\n```\n\n</section>\n\n<!-- /.usage -->\n\n<section class=\"examples\">\n\n## Examples\n\n<!-- eslint no-undef: \"error\" -->\n\n```javascript\nvar Complex128Array = require( '@stdlib/array-complex128' );\nvar discreteUniform = require( '@stdlib/random-array-discrete-uniform' );\nvar logEachMap = require( '@stdlib/console-log-each-map' );\nvar csub = require( '@stdlib/complex-float64-base-sub' );\n\n// Generate arrays of random values:\nvar z1 = new Complex128Array( discreteUniform( 200, -50, 50 ) );\nvar z2 = new Complex128Array( discreteUniform( 200, -50, 50 ) );\n\n// Perform element-wise subtraction:\nlogEachMap( '(%s) - (%s) = %s', z1, z2, csub );\n```\n\n</section>\n\n<!-- /.examples -->\n\n<!-- C interface documentation. -->\n\n* * *\n\n<section class=\"c\">\n\n## C APIs\n\n<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->\n\n<section class=\"intro\">\n\n</section>\n\n<!-- /.intro -->\n\n<!-- C usage documentation. -->\n\n<section class=\"usage\">\n\n### Usage\n\n```c\n#include \"stdlib/complex/float64/base/sub.h\"\n```\n\n#### stdlib_base_complex128_sub( z1, z2 )\n\nSubtracts two double-precision complex floating-point numbers.\n\n```c\n#include \"stdlib/complex/float64/ctor.h\"\n#include \"stdlib/complex/float64/real.h\"\n#include \"stdlib/complex/float64/imag.h\"\n\nstdlib_complex128_t z1 = stdlib_complex128( 5.0, 3.0 );\nstdlib_complex128_t z2 = stdlib_complex128( -2.0, 1.0 );\n\nstdlib_complex128_t out = stdlib_base_complex128_sub( z1, z2 );\n\ndouble re = stdlib_complex128_real( out );\n// returns 7.0\n\ndouble im = stdlib_complex128_imag( out );\n// returns 2.0\n```\n\nThe function accepts the following arguments:\n\n-   **z1**: `[in] stdlib_complex128_t` input value.\n-   **z2**: `[in] stdlib_complex128_t` input value.\n\n```c\nstdlib_complex128_t stdlib_base_complex128_sub( const stdlib_complex128_t z1, const stdlib_complex128_t z2 );\n```\n\n</section>\n\n<!-- /.usage -->\n\n<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->\n\n<section class=\"notes\">\n\n</section>\n\n<!-- /.notes -->\n\n<!-- C API usage examples. -->\n\n<section class=\"examples\">\n\n### Examples\n\n```c\n#include \"stdlib/complex/float64/base/sub.h\"\n#include \"stdlib/complex/float64/ctor.h\"\n#include \"stdlib/complex/float64/reim.h\"\n#include <stdio.h>\n\nint main( void ) {\n    const stdlib_complex128_t x[] = {\n        stdlib_complex128( 3.14, 1.5 ),\n        stdlib_complex128( -3.14, 1.5 ),\n        stdlib_complex128( 0.0, -0.0 ),\n        stdlib_complex128( 0.0/0.0, 0.0/0.0 )\n    };\n\n    stdlib_complex128_t v;\n    stdlib_complex128_t y;\n    double re;\n    double im;\n    int i;\n    for ( i = 0; i < 4; i++ ) {\n        v = x[ i ];\n        stdlib_complex128_reim( v, &re, &im );\n        printf( \"z = %lf + %lfi\\n\", re, im );\n\n        y = stdlib_base_complex128_sub( v, v );\n        stdlib_complex128_reim( y, &re, &im );\n        printf( \"csub(z, z) = %lf + %lfi\\n\", re, im );\n    }\n}\n```\n\n</section>\n\n<!-- /.examples -->\n\n</section>\n\n<!-- /.c -->\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* * *\n\n## See Also\n\n-   <span class=\"package-name\">[`@stdlib/complex-float64/base/add`][@stdlib/complex/float64/base/add]</span><span class=\"delimiter\">: </span><span class=\"description\">add two double-precision complex floating-point numbers.</span>\n-   <span class=\"package-name\">[`@stdlib/complex-float64/base/div`][@stdlib/complex/float64/base/div]</span><span class=\"delimiter\">: </span><span class=\"description\">divide two complex numbers.</span>\n-   <span class=\"package-name\">[`@stdlib/complex-float64/base/mul`][@stdlib/complex/float64/base/mul]</span><span class=\"delimiter\">: </span><span class=\"description\">multiply two double-precision complex floating-point numbers.</span>\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-2026. 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-float64-base-sub.svg\n[npm-url]: https://npmjs.org/package/@stdlib/complex-float64-base-sub\n\n[test-image]: https://github.com/stdlib-js/complex-float64-base-sub/actions/workflows/test.yml/badge.svg?branch=v0.1.1\n[test-url]: https://github.com/stdlib-js/complex-float64-base-sub/actions/workflows/test.yml?query=branch:v0.1.1\n\n[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/complex-float64-base-sub/main.svg\n[coverage-url]: https://codecov.io/github/stdlib-js/complex-float64-base-sub?branch=main\n\n<!--\n\n[dependencies-image]: https://img.shields.io/david/stdlib-js/complex-float64-base-sub.svg\n[dependencies-url]: https://david-dm.org/stdlib-js/complex-float64-base-sub/main\n\n-->\n\n[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg\n[chat-url]: https://stdlib.zulipchat.com\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-float64-base-sub/tree/deno\n[deno-readme]: https://github.com/stdlib-js/complex-float64-base-sub/blob/deno/README.md\n[umd-url]: https://github.com/stdlib-js/complex-float64-base-sub/tree/umd\n[umd-readme]: https://github.com/stdlib-js/complex-float64-base-sub/blob/umd/README.md\n[esm-url]: https://github.com/stdlib-js/complex-float64-base-sub/tree/esm\n[esm-readme]: https://github.com/stdlib-js/complex-float64-base-sub/blob/esm/README.md\n[branches-url]: https://github.com/stdlib-js/complex-float64-base-sub/blob/main/branches.md\n\n[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/complex-float64-base-sub/main/LICENSE\n\n<!-- <related-links> -->\n\n[@stdlib/complex/float64/base/add]: https://www.npmjs.com/package/@stdlib/complex-float64-base-add\n\n[@stdlib/complex/float64/base/div]: https://www.npmjs.com/package/@stdlib/complex-float64-base-div\n\n[@stdlib/complex/float64/base/mul]: https://www.npmjs.com/package/@stdlib/complex-float64-base-mul\n\n<!-- </related-links> -->\n\n</section>\n\n<!-- /.links -->\n","readmeFilename":"README.md"}