Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/complex/float64/base/add/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ int main( void ) {

- <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>
- <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>
- <span class="package-name">[`@stdlib/math/base/ops/csub`][@stdlib/math/base/ops/csub]</span><span class="delimiter">: </span><span class="description">subtract two double-precision complex floating-point numbers.</span>
- <span class="package-name">[`@stdlib/complex/float64/base/sub`][@stdlib/complex/float64/base/sub]</span><span class="delimiter">: </span><span class="description">subtract two double-precision complex floating-point numbers.</span>

</section>

Expand All @@ -283,7 +283,7 @@ int main( void ) {

[@stdlib/complex/float64/base/mul]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/float64/base/mul

[@stdlib/math/base/ops/csub]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/ops/csub
[@stdlib/complex/float64/base/sub]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/float64/base/sub

<!-- </related-links> -->

Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/complex/float64/base/div/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ int main( void ) {

- <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>
- <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>
- <span class="package-name">[`@stdlib/math/base/ops/csub`][@stdlib/math/base/ops/csub]</span><span class="delimiter">: </span><span class="description">subtract two double-precision complex floating-point numbers.</span>
- <span class="package-name">[`@stdlib/complex/float64/base/sub`][@stdlib/complex/float64/base/sub]</span><span class="delimiter">: </span><span class="description">subtract two double-precision complex floating-point numbers.</span>

</section>

Expand All @@ -259,7 +259,7 @@ int main( void ) {

[@stdlib/complex/float64/base/mul]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/float64/base/mul

[@stdlib/math/base/ops/csub]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/ops/csub
[@stdlib/complex/float64/base/sub]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/float64/base/sub

<!-- </related-links> -->

Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/complex/float64/base/mul/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ int main( void ) {

- <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>
- <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>
- <span class="package-name">[`@stdlib/math/base/ops/csub`][@stdlib/math/base/ops/csub]</span><span class="delimiter">: </span><span class="description">subtract two double-precision complex floating-point numbers.</span>
- <span class="package-name">[`@stdlib/complex/float64/base/sub`][@stdlib/complex/float64/base/sub]</span><span class="delimiter">: </span><span class="description">subtract two double-precision complex floating-point numbers.</span>

</section>

Expand All @@ -292,7 +292,7 @@ int main( void ) {

[@stdlib/complex/float64/base/div]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/float64/base/div

[@stdlib/math/base/ops/csub]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/ops/csub
[@stdlib/complex/float64/base/sub]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/float64/base/sub

<!-- </related-links> -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ limitations under the License.
## Usage

```javascript
var csub = require( '@stdlib/math/base/ops/csub' );
var csub = require( '@stdlib/complex/float64/base/sub' );
```

#### csub( z1, z2 )
Expand Down Expand Up @@ -71,7 +71,7 @@ var im = imag( v );
```javascript
var Complex128 = require( '@stdlib/complex/float64/ctor' );
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
var csub = require( '@stdlib/math/base/ops/csub' );
var csub = require( '@stdlib/complex/float64/base/sub' );

var rand;
var z1;
Expand Down Expand Up @@ -115,10 +115,10 @@ for ( i = 0; i < 100; i++ ) {
### Usage

```c
#include "stdlib/math/base/ops/csub.h"
#include "stdlib/complex/float64/base/sub.h"
```

#### stdlib_base_csub( z1, z2 )
#### stdlib_base_complex128_sub( z1, z2 )

Subtracts two double-precision complex floating-point numbers.

Expand All @@ -130,7 +130,7 @@ Subtracts two double-precision complex floating-point numbers.
stdlib_complex128_t z1 = stdlib_complex128( 5.0, 3.0 );
stdlib_complex128_t z2 = stdlib_complex128( -2.0, 1.0 );

stdlib_complex128_t out = stdlib_base_csub( z1, z2 );
stdlib_complex128_t out = stdlib_base_complex128_sub( z1, z2 );

double re = stdlib_complex128_real( out );
// returns 7.0
Expand All @@ -145,7 +145,7 @@ The function accepts the following arguments:
- **z2**: `[in] stdlib_complex128_t` input value.

```c
stdlib_complex128_t stdlib_base_csub( const stdlib_complex128_t z1, const stdlib_complex128_t z2 );
stdlib_complex128_t stdlib_base_complex128_sub( const stdlib_complex128_t z1, const stdlib_complex128_t z2 );
```

</section>
Expand All @@ -167,7 +167,7 @@ stdlib_complex128_t stdlib_base_csub( const stdlib_complex128_t z1, const stdlib
### Examples

```c
#include "stdlib/math/base/ops/csub.h"
#include "stdlib/complex/float64/base/sub.h"
#include "stdlib/complex/float64/ctor.h"
#include "stdlib/complex/float64/reim.h"
#include <stdio.h>
Expand All @@ -190,7 +190,7 @@ int main( void ) {
stdlib_complex128_reim( v, &re, &im );
printf( "z = %lf + %lfi\n", re, im );

y = stdlib_base_csub( v, v );
y = stdlib_base_complex128_sub( v, v );
stdlib_complex128_reim( y, &re, &im );
printf( "csub(z, z) = %lf + %lfi\n", re, im );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

#include "stdlib/math/base/ops/csub.h"
#include "stdlib/complex/float64/base/sub.h"
#include "stdlib/complex/float64/ctor.h"
#include "stdlib/complex/float64/reim.h"
#include <stdlib.h>
Expand Down Expand Up @@ -113,7 +113,7 @@ static double benchmark( void ) {
im = ( 1000.0*rand_double() ) - 500.0;
z2 = stdlib_complex128( re, im );

z3 = stdlib_base_csub( z1, z2 );
z3 = stdlib_base_complex128_sub( z1, z2 );
stdlib_complex128_reim( z3, &re, &im );
if ( re != re ) {
printf( "should not return NaN\n" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

#include "stdlib/math/base/ops/csub.h"
#include "stdlib/complex/float64/base/sub.h"
#include "stdlib/complex/float64/ctor.h"
#include "stdlib/complex/float64/reim.h"
#include <stdio.h>
Expand All @@ -39,7 +39,7 @@ int main( void ) {
stdlib_complex128_reim( v, &re, &im );
printf( "z = %lf + %lfi\n", re, im );

y = stdlib_base_csub( v, v );
y = stdlib_base_complex128_sub( v, v );
stdlib_complex128_reim( y, &re, &im );
printf( "csub(z, z) = %lf + %lfi\n", re, im );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
*/

#ifndef STDLIB_MATH_BASE_OPS_CSUB_H
#define STDLIB_MATH_BASE_OPS_CSUB_H
#ifndef STDLIB_COMPLEX_FLOAT64_BASE_SUB_H
#define STDLIB_COMPLEX_FLOAT64_BASE_SUB_H

#include "stdlib/complex/float64/ctor.h"

Expand All @@ -31,10 +31,10 @@ extern "C" {
/**
* Subtracts two double-precision complex floating-point numbers.
*/
stdlib_complex128_t stdlib_base_csub( const stdlib_complex128_t z1, const stdlib_complex128_t z2 );
stdlib_complex128_t stdlib_base_complex128_sub( const stdlib_complex128_t z1, const stdlib_complex128_t z2 );

#ifdef __cplusplus
}
#endif

#endif // !STDLIB_MATH_BASE_OPS_CSUB_H
#endif // !STDLIB_COMPLEX_FLOAT64_BASE_SUB_H
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
/**
* Subtract two double-precision complex floating-point numbers.
*
* @module @stdlib/math/base/ops/csub
* @module @stdlib/complex/float64/base/sub
*
* @example
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
* var real = require( '@stdlib/complex/float64/real' );
* var imag = require( '@stdlib/complex/float64/imag' );
* var csub = require( '@stdlib/math/base/ops/csub' );
* var csub = require( '@stdlib/complex/float64/base/sub' );
*
* var z1 = new Complex128( 5.0, 3.0 );
* // returns <Complex128>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@stdlib/math/base/ops/csub",
"name": "@stdlib/complex/float64/base/sub",
"version": "0.0.0",
"description": "Subtract two double-precision complex floating-point numbers.",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
*/

#include "stdlib/math/base/ops/csub.h"
#include "stdlib/complex/float64/base/sub.h"
#include "stdlib/math/base/napi/binary.h"

// cppcheck-suppress shadowFunction
STDLIB_MATH_BASE_NAPI_MODULE_ZZ_Z( stdlib_base_csub )
STDLIB_MATH_BASE_NAPI_MODULE_ZZ_Z( stdlib_base_complex128_sub )
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

#include "stdlib/math/base/ops/csub.h"
#include "stdlib/complex/float64/base/sub.h"
#include "stdlib/complex/float64/ctor.h"
#include "stdlib/complex/float64/reim.h"

Expand All @@ -35,15 +35,15 @@
* stdlib_complex128_t z1 = stdlib_complex128( 5.0, 3.0 );
* stdlib_complex128_t z2 = stdlib_complex128( -2.0, 1.0 );
*
* stdlib_complex128_t out = stdlib_base_csub( z1, z2 );
* stdlib_complex128_t out = stdlib_base_complex128_sub( z1, z2 );
*
* double re = stdlib_complex128_real( out );
* // returns 7.0
*
* double im = stdlib_complex128_imag( out );
* // returns 2.0
*/
stdlib_complex128_t stdlib_base_csub( const stdlib_complex128_t z1, const stdlib_complex128_t z2 ) {
stdlib_complex128_t stdlib_base_complex128_sub( const stdlib_complex128_t z1, const stdlib_complex128_t z2 ) {
double re1;
double re2;
double im1;
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/math/base/ops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The namespace contains the following functions:

<div class="namespace-toc">

- <span class="signature">[`csub( z1, z2 )`][@stdlib/math/base/ops/csub]</span><span class="delimiter">: </span><span class="description">subtract two double-precision complex floating-point numbers.</span>
- <span class="signature">[`csub( z1, z2 )`][@stdlib/complex/float64/base/sub]</span><span class="delimiter">: </span><span class="description">subtract two double-precision complex floating-point numbers.</span>
- <span class="signature">[`csubf( z1, z2 )`][@stdlib/math/base/ops/csubf]</span><span class="delimiter">: </span><span class="description">subtract two single-precision complex floating-point numbers.</span>

</div>
Expand Down Expand Up @@ -88,7 +88,7 @@ console.log( ns );

<!-- <toc-links> -->

[@stdlib/math/base/ops/csub]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/ops/csub
[@stdlib/complex/float64/base/sub]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/float64/base/sub

[@stdlib/math/base/ops/csubf]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/ops/csubf

Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/math/base/ops/csubf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ int main( void ) {

- <span class="package-name">[`@stdlib/complex/float32/base/add`][@stdlib/complex/float32/base/add]</span><span class="delimiter">: </span><span class="description">add two single-precision complex floating-point numbers.</span>
- <span class="package-name">[`@stdlib/complex/float32/base/mul`][@stdlib/complex/float32/base/mul]</span><span class="delimiter">: </span><span class="description">multiply two single-precision complex floating-point numbers.</span>
- <span class="package-name">[`@stdlib/math/base/ops/csub`][@stdlib/math/base/ops/csub]</span><span class="delimiter">: </span><span class="description">subtract two double-precision complex floating-point numbers.</span>
- <span class="package-name">[`@stdlib/complex/float64/base/sub`][@stdlib/complex/float64/base/sub]</span><span class="delimiter">: </span><span class="description">subtract two double-precision complex floating-point numbers.</span>

</section>

Expand All @@ -230,7 +230,7 @@ int main( void ) {

[@stdlib/complex/float32/base/mul]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/float32/base/mul

[@stdlib/math/base/ops/csub]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/ops/csub
[@stdlib/complex/float64/base/sub]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/float64/base/sub

<!-- </related-links> -->

Expand Down
30 changes: 0 additions & 30 deletions lib/node_modules/@stdlib/math/base/ops/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import caddf = require( '@stdlib/complex/float32/base/add' );
import cmulf = require( '@stdlib/complex/float32/base/mul' );
import cadd = require( '@stdlib/complex/float64/base/add' );
import cmul = require( '@stdlib/complex/float64/base/mul' );
import csub = require( '@stdlib/math/base/ops/csub' );
import csubf = require( '@stdlib/math/base/ops/csubf' );
import mul = require( '@stdlib/number/float64/base/mul' );
import sub = require( '@stdlib/number/float64/base/sub' );
Expand Down Expand Up @@ -200,35 +199,6 @@ interface Namespace {
*/
cmul: typeof cmul;

/**
* Subtracts two double-precision complex floating-point numbers.
*
* @param z1 - complex number
* @param z2 - complex number
* @returns result
*
* @example
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
* var real = require( '@stdlib/complex/float64/real' );
* var imag = require( '@stdlib/complex/float64/imag' );
*
* var z1 = new Complex128( 5.0, 3.0 );
* // returns <Complex128>
*
* var z2 = new Complex128( -2.0, 1.0 );
* // returns <Complex128>
*
* var out = ns.csub( z1, z2 );
* // returns <Complex128>
*
* var re = real( out );
* // returns 7.0
*
* var im = imag( out );
* // returns 2.0
*/
csub: typeof csub;

/**
* Subtracts two single-precision complex floating-point numbers.
*
Expand Down
9 changes: 0 additions & 9 deletions lib/node_modules/@stdlib/math/base/ops/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,6 @@ setReadOnly( ns, 'cadd', require( '@stdlib/complex/float64/base/add' ) );
*/
setReadOnly( ns, 'cmul', require( '@stdlib/complex/float64/base/mul' ) );

/**
* @name csub
* @memberof ns
* @readonly
* @type {Function}
* @see {@link module:@stdlib/math/base/ops/csub}
*/
setReadOnly( ns, 'csub', require( '@stdlib/math/base/ops/csub' ) );

/**
* @name csubf
* @memberof ns
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/math/strided/ops/sub/lib/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// MODULES //

var sub = require( '@stdlib/number/float64/base/sub' );
var csub = require( '@stdlib/math/base/ops/csub' );
var csub = require( '@stdlib/complex/float64/base/sub' );
var csubf = require( '@stdlib/math/base/ops/csubf' );
var callbacks = require( '@stdlib/strided/base/binary-signature-callbacks' );
var types = require( './types.js' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"dependencies": [
"@stdlib/number/float64/base/sub",
"@stdlib/number/float32/base/sub",
"@stdlib/math/base/ops/csub",
"@stdlib/complex/float64/base/sub",
"@stdlib/math/base/ops/csubf",
"@stdlib/strided/base/function-object",
"@stdlib/strided/base/binary",
Expand Down
Loading