Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
27 changes: 8 additions & 19 deletions lib/node_modules/@stdlib/complex/float64/base/div/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,17 @@ var im = imag( v );
<!-- eslint no-undef: "error" -->

```javascript
var Complex128 = require( '@stdlib/complex/float64/ctor' );
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
var real = require( '@stdlib/complex/float64/real' );
var imag = require( '@stdlib/complex/float64/imag' );
var Complex128Array = require( '@stdlib/array/complex128' );
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
var logEachMap = require( '@stdlib/console/log-each-map' );
var cdiv = require( '@stdlib/complex/float64/base/div' );

function randomComplex() {
var re = discreteUniform( -50, 50 );
var im = discreteUniform( -50, 50 );
return new Complex128( re, im );
}
// Generate arrays of random values:
var z1 = new Complex128Array( discreteUniform( 200, -50, 50 ) );
var z2 = new Complex128Array( discreteUniform( 200, -50, 50 ) );

var z1;
var z2;
var z3;
var i;
for ( i = 0; i < 100; i++ ) {
z1 = randomComplex();
z2 = randomComplex();
z3 = cdiv( z1, z2 );
console.log( '(%s) / (%s) = %s', z1.toString(), z2.toString(), z3.toString() );
}
// Perform division for each element of arrays:
logEachMap( '(%s) * (%s) = %s', z1, z2, cdiv );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect. cc @Planeshifter

```

</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,14 @@

'use strict';

var Complex128 = require( '@stdlib/complex/float64/ctor' );
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
var Complex128Array = require( '@stdlib/array/complex128' );
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
var logEachMap = require( '@stdlib/console/log-each-map' );
var cdiv = require( './../lib' );

function randomComplex() {
var re = discreteUniform( -50, 50 );
var im = discreteUniform( -50, 50 );
return new Complex128( re, im );
}
// Generate arrays of random values:
var z1 = new Complex128Array( discreteUniform( 200, -50, 50 ) );
var z2 = new Complex128Array( discreteUniform( 200, -50, 50 ) );

var z1;
var z2;
var z3;
var i;
for ( i = 0; i < 100; i++ ) {
z1 = randomComplex();
z2 = randomComplex();
z3 = cdiv( z1, z2 );
console.log( '(%s) / (%s) = %s', z1.toString(), z2.toString(), z3.toString() );
}
// Perform division for each element of arrays
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Planeshifter Please make sure the comments are consistent and have the correct ending. I just pushed a change updating the comments for mul. These and other comments should follow suit.

logEachMap( '(%s) * (%s) = %s', z1, z2, cdiv );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Planeshifter This is incorrect.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ShabiShett07 I suggest slowing down a bit and being more intentional about the changes are you making. Several of these PRs have copy-paste mistakes. Those need to be minimized, otherwise it undermines trust in your work.