{"_id":"@stdlib/complex-float64-base-scale","_rev":"2-444d50d4c77d4f965678e7894fed4385","name":"@stdlib/complex-float64-base-scale","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@stdlib/complex-float64-base-scale","version":"0.1.0","keywords":["stdlib","stdmath","mathematics","math","mul","cmul","mult","multiply","multiplication","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-scale@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":"81975911b5b6691d92a409a95623e0a747dbfa9c","tarball":"https://registry.npmjs.org/@stdlib/complex-float64-base-scale/-/complex-float64-base-scale-0.1.0.tgz","fileCount":18,"integrity":"sha512-Li45bg0TzWDUiCCeH/3o/M4YI1RtGcfbAyBvmy89+fWzgakyWQwSRFyI8gqa2g4i9VpbSMa9OAUtyehxoauM9Q==","signatures":[{"sig":"MEQCIAt35jZXwGKa8bSaQma72SN0cXwmpnoXAyGMfxUSYJk4AiBFc1zMiAwtc6xjyZsK5rO6cfga05W5DS+3wtsJ32rwcA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47977},"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-scale.git","type":"git"},"_npmVersion":"10.8.2","description":"Scale a double-precision complex floating-point number by a real-valued double-precision floating-point scalar constant.","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","@stdlib/utils-define-nonenumerable-read-only-property":"^0.2.2"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/complex-float64-base-scale_0.1.0_1769720490279_0.3464155965182145","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@stdlib/complex-float64-base-scale","version":"0.1.1","description":"Scale a double-precision complex floating-point number by a real-valued double-precision floating-point scalar constant.","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-scale.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-define-nonenumerable-read-only-property":"^0.2.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","mul","cmul","mult","multiply","multiplication","arithmetic","complex","cmplx","number"],"funding":{"type":"opencollective","url":"https://opencollective.com/stdlib"},"_id":"@stdlib/complex-float64-base-scale@0.1.1","gitHead":"65ac870bcc9363ee25cdde72514d9e0783b5395e","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-nA++BJ1F1oykyJt9rNAn1SOBACcCjYUNAlEHxbn//Fe0XUZrgquwU62COA5ROcHJPzMGKC6xAvQrvCXICRVpHA==","shasum":"10cd50c719718eadf9bd246b1bf7b893963df07f","tarball":"https://registry.npmjs.org/@stdlib/complex-float64-base-scale/-/complex-float64-base-scale-0.1.1.tgz","fileCount":18,"unpackedSize":47977,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDrZ7OYXwkcBZTFmCtXNZGVBDLyGMdCXlfTCvFaM/3y3wIhAIxgv4wgh4AXXp2QJtV1bvGQCkYg91KTS7c2BK5U0Chx"}]},"_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-scale_0.1.1_1770491011688_0.1601873721653102"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-29T21:01:30.164Z","modified":"2026-02-07T19:03:31.991Z","0.1.0":"2026-01-29T21:01:30.460Z","0.1.1":"2026-02-07T19:03:31.833Z"},"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","mul","cmul","mult","multiply","multiplication","arithmetic","complex","cmplx","number"],"repository":{"type":"git","url":"git://github.com/stdlib-js/complex-float64-base-scale.git"},"description":"Scale a double-precision complex floating-point number by a real-valued double-precision floating-point scalar constant.","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) 2025 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# scale\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> Scale a double-precision complex floating-point number by a real-valued double-precision floating-point scalar constant.\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-scale\n```\n\n</section>\n\n<section class=\"usage\">\n\n## Usage\n\n```javascript\nvar scale = require( '@stdlib/complex-float64-base-scale' );\n```\n\n#### scale( alpha, z )\n\nScales a double-precision complex floating-point number by a real-valued double-precision floating-point scalar constant.\n\n```javascript\nvar Complex128 = require( '@stdlib/complex-float64-ctor' );\n\nvar z = new Complex128( 5.0, 3.0 );\n\nvar v = scale( 5.0, z );\n// returns <Complex128>[ 25.0, 15.0 ]\n```\n\nThe function supports the following parameters:\n\n-   **alpha**: real-valued scalar constant.\n-   **z**: [complex number][@stdlib/complex/float64/ctor].\n\n#### scale.assign( alpha, re1, im1, out, strideOut, offsetOut )\n\nScales a double-precision complex floating-point number by a real-valued double-precision floating-point scalar constant and assigns results to a provided output array.\n\n```javascript\nvar Float64Array = require( '@stdlib/array-float64' );\n\nvar out = new Float64Array( 2 );\nvar v = scale.assign( 5.0, 5.0, 3.0, out, 1, 0 );\n// returns <Float64Array>[ 25.0, 15.0 ]\n\nvar bool = ( out === v );\n// returns true\n```\n\nThe function supports the following parameters:\n\n-   **alpha**: real-valued scalar constant.\n-   **re**: real component of the complex number.\n-   **im**: imaginary component of the complex number.\n-   **out**: output array.\n-   **strideOut**: stride length for `out`.\n-   **offsetOut**: starting index for `out`.\n\n#### scale.strided( alpha, z, sz, oz, out, so, oo )\n\nScales a double-precision complex floating-point number stored in a real-valued strided array view by a real-valued double-precision floating-point scalar constant and assigns results to a provided strided output array.\n\n```javascript\nvar Float64Array = require( '@stdlib/array-float64' );\n\nvar z = new Float64Array( [ 5.0, 3.0 ] );\nvar out = new Float64Array( 2 );\n\nvar v = scale.strided( 5.0, z, 1, 0, out, 1, 0 );\n// returns <Float64Array>[ 25.0, 15.0 ]\n\nvar bool = ( out === v );\n// returns true\n```\n\nThe function supports the following parameters:\n\n-   **alpha**: real-valued scalar constant.\n-   **z**: complex number strided array view.\n-   **sz**: stride length for `z`.\n-   **oz**: starting index for `z`.\n-   **out**: output array.\n-   **so**: stride length for `out`.\n-   **oo**: starting index for `out`.\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 scale = require( '@stdlib/complex-float64-base-scale' );\n\n// Generate an array of random values:\nvar values = new Complex128Array( discreteUniform( 200, -50, 50 ) );\n\n// Scale each by a scalar constant:\nlogEachMap( '%0.1f * (%s) = %s', 5.0, values, scale );\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/scale.h\"\n```\n\n#### stdlib_base_complex128_scale( alpha, z )\n\nScales a double-precision complex floating-point number by a real-valued double-precision floating-point scalar constant.\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 z = stdlib_complex128( 5.0, 3.0 );\n\nstdlib_complex128_t out = stdlib_base_complex128_scale( 5.0, z );\n\ndouble re = stdlib_complex128_real( out );\n// returns 25.0\n\ndouble im = stdlib_complex128_imag( out );\n// returns 15.0\n```\n\nThe function accepts the following arguments:\n\n-   **alpha**: `[in] double` scalar constant.\n-   **z**: `[in] stdlib_complex128_t` complex number.\n\n```c\nstdlib_complex128_t stdlib_base_complex128_scale( const double alpha, const stdlib_complex128_t z );\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/scale.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_scale( 5.0, v );\n        stdlib_complex128_reim( y, &re, &im );\n        printf( \"scale(5.0, 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</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-scale.svg\n[npm-url]: https://npmjs.org/package/@stdlib/complex-float64-base-scale\n\n[test-image]: https://github.com/stdlib-js/complex-float64-base-scale/actions/workflows/test.yml/badge.svg?branch=v0.1.1\n[test-url]: https://github.com/stdlib-js/complex-float64-base-scale/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-scale/main.svg\n[coverage-url]: https://codecov.io/github/stdlib-js/complex-float64-base-scale?branch=main\n\n<!--\n\n[dependencies-image]: https://img.shields.io/david/stdlib-js/complex-float64-base-scale.svg\n[dependencies-url]: https://david-dm.org/stdlib-js/complex-float64-base-scale/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-scale/tree/deno\n[deno-readme]: https://github.com/stdlib-js/complex-float64-base-scale/blob/deno/README.md\n[umd-url]: https://github.com/stdlib-js/complex-float64-base-scale/tree/umd\n[umd-readme]: https://github.com/stdlib-js/complex-float64-base-scale/blob/umd/README.md\n[esm-url]: https://github.com/stdlib-js/complex-float64-base-scale/tree/esm\n[esm-readme]: https://github.com/stdlib-js/complex-float64-base-scale/blob/esm/README.md\n[branches-url]: https://github.com/stdlib-js/complex-float64-base-scale/blob/main/branches.md\n\n[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/complex-float64-base-scale/main/LICENSE\n\n[@stdlib/complex/float64/ctor]: https://www.npmjs.com/package/@stdlib/complex-float64-ctor\n\n</section>\n\n<!-- /.links -->\n","readmeFilename":"README.md"}