time-to-botec/squiggle/node_modules/@stdlib/math/base/ops/README.md

100 lines
2.8 KiB
Markdown
Raw Normal View History

<!--
@license Apache-2.0
Copyright (c) 2021 The Stdlib Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
# Operators
> Standard library base math operators.
<section class="usage">
## Usage
```javascript
var ns = require( '@stdlib/math/base/ops' );
```
#### ns
Standard library base math operators.
```javascript
var operators = ns;
// returns {...}
```
The namespace contains the following functions:
<!-- <toc pattern="*"> -->
<div class="namespace-toc">
- <span class="signature">[`cadd( [out,] re1, im1, re2, im2 )`][@stdlib/math/base/ops/cadd]</span><span class="delimiter">: </span><span class="description">add two complex numbers.</span>
- <span class="signature">[`cdiv( [out,] re1, im1, re2, im2 )`][@stdlib/math/base/ops/cdiv]</span><span class="delimiter">: </span><span class="description">divide two complex numbers.</span>
- <span class="signature">[`cmul( [out,] re1, im1, re2, im2 )`][@stdlib/math/base/ops/cmul]</span><span class="delimiter">: </span><span class="description">multiply two complex numbers.</span>
- <span class="signature">[`cneg( [out,] re, im )`][@stdlib/math/base/ops/cneg]</span><span class="delimiter">: </span><span class="description">negate a complex number.</span>
- <span class="signature">[`csub( [out,] re1, im1, re2, im2 )`][@stdlib/math/base/ops/csub]</span><span class="delimiter">: </span><span class="description">subtract two complex numbers.</span>
</div>
<!-- </toc> -->
</section>
<!-- /.usage -->
<section class="examples">
## Examples
<!-- TODO: better examples -->
<!-- eslint no-undef: "error" -->
```javascript
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/math/base/ops' );
console.log( objectKeys( ns ) );
```
</section>
<!-- /.examples -->
<section class="links">
<!-- <toc-links> -->
[@stdlib/math/base/ops/cadd]: https://www.npmjs.com/package/@stdlib/math/tree/main/base/ops/cadd
[@stdlib/math/base/ops/cdiv]: https://www.npmjs.com/package/@stdlib/math/tree/main/base/ops/cdiv
[@stdlib/math/base/ops/cmul]: https://www.npmjs.com/package/@stdlib/math/tree/main/base/ops/cmul
[@stdlib/math/base/ops/cneg]: https://www.npmjs.com/package/@stdlib/math/tree/main/base/ops/cneg
[@stdlib/math/base/ops/csub]: https://www.npmjs.com/package/@stdlib/math/tree/main/base/ops/csub
<!-- </toc-links> -->
</section>
<!-- /.links -->