Skip to content

Commit 68ce96f

Browse files
authored
Merge pull request #6028 from gururaj1512/migrate-math-base-ops-cneg
PR-URL: #6028 Ref: #2261 Reviewed-by: Athan Reines <[email protected]>
2 parents db9696d + fc32967 commit 68ce96f

File tree

44 files changed

+47
-119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+47
-119
lines changed

lib/node_modules/@stdlib/math/base/ops/cneg/README.md renamed to lib/node_modules/@stdlib/complex/float64/base/neg/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ limitations under the License.
3737
## Usage
3838

3939
```javascript
40-
var cneg = require( '@stdlib/math/base/ops/cneg' );
40+
var cneg = require( '@stdlib/complex/float64/base/neg' );
4141
```
4242

4343
#### cneg( z )
@@ -106,7 +106,7 @@ im = imag( out );
106106
```javascript
107107
var Complex128 = require( '@stdlib/complex/float64/ctor' );
108108
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
109-
var cneg = require( '@stdlib/math/base/ops/cneg' );
109+
var cneg = require( '@stdlib/complex/float64/base/neg' );
110110

111111
function randomComplex() {
112112
var re = discreteUniform( -50, 50 );
@@ -152,10 +152,10 @@ for ( i = 0; i < 100; i++ ) {
152152
### Usage
153153

154154
```c
155-
#include "stdlib/math/base/ops/cneg.h"
155+
#include "stdlib/complex/float64/base/neg.h"
156156
```
157157

158-
#### stdlib_base_cneg( z )
158+
#### stdlib_base_complex128_neg( z )
159159

160160
Negates a double-precision complex floating-point number.
161161

@@ -166,7 +166,7 @@ Negates a double-precision complex floating-point number.
166166

167167
stdlib_complex128_t z = stdlib_complex128( 3.0, -2.0 );
168168

169-
stdlib_complex128_t out = stdlib_base_cneg( z );
169+
stdlib_complex128_t out = stdlib_base_complex128_neg( z );
170170

171171
double re = stdlib_complex128_real( out );
172172
// returns -3.0
@@ -180,7 +180,7 @@ The function accepts the following arguments:
180180
- **z**: `[in] stdlib_complex128_t` input value.
181181

182182
```c
183-
stdlib_complex128_t stdlib_base_cneg( const stdlib_complex128_t z );
183+
stdlib_complex128_t stdlib_base_complex128_neg( const stdlib_complex128_t z );
184184
```
185185
186186
</section>
@@ -202,7 +202,7 @@ stdlib_complex128_t stdlib_base_cneg( const stdlib_complex128_t z );
202202
### Examples
203203
204204
```c
205-
#include "stdlib/math/base/ops/cneg.h"
205+
#include "stdlib/complex/float64/base/neg.h"
206206
#include "stdlib/complex/float64/ctor.h"
207207
#include "stdlib/complex/float64/reim.h"
208208
#include <stdio.h>
@@ -225,7 +225,7 @@ int main( void ) {
225225
stdlib_complex128_reim( v, &re, &im );
226226
printf( "z = %lf + %lfi\n", re, im );
227227
228-
y = stdlib_base_cneg( v );
228+
y = stdlib_base_complex128_neg( v );
229229
stdlib_complex128_reim( y, &re, &im );
230230
printf( "cneg(z) = %lf + %lfi\n", re, im );
231231
}

lib/node_modules/@stdlib/math/base/ops/cneg/benchmark/c/native/benchmark.c renamed to lib/node_modules/@stdlib/complex/float64/base/neg/benchmark/c/native/benchmark.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19-
#include "stdlib/math/base/ops/cneg.h"
19+
#include "stdlib/complex/float64/base/neg.h"
2020
#include "stdlib/complex/float64/ctor.h"
2121
#include "stdlib/complex/float64/reim.h"
2222
#include <stdlib.h>
@@ -107,7 +107,7 @@ static double benchmark( void ) {
107107
im = ( 1000.0*rand_double() ) - 500.0;
108108
z1 = stdlib_complex128( re, im );
109109

110-
z2 = stdlib_base_cneg( z1 );
110+
z2 = stdlib_base_complex128_neg( z1 );
111111
stdlib_complex128_reim( z2, &re, &im );
112112
if ( re != re ) {
113113
printf( "should not return NaN\n" );

0 commit comments

Comments
 (0)