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
34 changes: 4 additions & 30 deletions lib/node_modules/@stdlib/math/base/special/cround/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,18 @@ Rounds each component of a double-precision complex floating-point number to the

```javascript
var Complex128 = require( '@stdlib/complex/float64/ctor' );
var real = require( '@stdlib/complex/float64/real' );
var imag = require( '@stdlib/complex/float64/imag' );

var v = cround( new Complex128( -4.2, 5.5 ) );
// returns <Complex128>

var re = real( v );
// returns -4.0

var im = imag( v );
// returns 6.0
// returns <Complex128>[ -4.0, 6.0 ]

v = cround( new Complex128( 9.99999, 0.1 ) );
// returns <Complex128>

re = real( v );
// returns 10.0

im = imag( v );
// returns 0.0
// returns <Complex128>[ 10.0, 0.0 ]

v = cround( new Complex128( 0.0, 0.0 ) );
// returns <Complex128>

re = real( v );
// returns 0.0

im = imag( v );
// returns 0.0
// returns <Complex128>[ 0.0, 0.0 ]

v = cround( new Complex128( NaN, NaN ) );
// returns <Complex128>

re = real( v );
// returns NaN

im = imag( v );
// returns NaN
// returns <Complex128>[ NaN, NaN ]
```

</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
Examples
--------
> var v = {{alias}}( new {{alias:@stdlib/complex/float64/ctor}}( 5.5, 3.3 ) )
<Complex128>
> var re = {{alias:@stdlib/complex/float64/real}}( v )
6.0
> var im = {{alias:@stdlib/complex/float64/imag}}( v )
3.0
<Complex128>[ 6.0, 3.0 ]

See Also
--------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,7 @@ import { Complex128 } from '@stdlib/types/complex';
* var imag = require( '@stdlib/complex/float64/imag' );
*
* var v = cround( new Complex128( -4.2, 5.5 ) );
* // returns <Complex128>
*
* var re = real( v );
* // returns -4.0
*
* var im = imag( v );
* // returns 6.0
* // returns <Complex128>[ -4.0, 6.0 ]
*/
declare function cround( z: Complex128 ): Complex128;

Expand Down
34 changes: 4 additions & 30 deletions lib/node_modules/@stdlib/math/base/special/cround/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,45 +25,19 @@
*
* @example
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
* var real = require( '@stdlib/complex/float64/real' );
* var imag = require( '@stdlib/complex/float64/imag' );
* var cround = require( '@stdlib/math/base/special/cround' );
*
* var v = cround( new Complex128( -4.2, 5.5 ) );
* // returns <Complex128>
*
* var re = real( v );
* // returns -4.0
*
* var im = imag( v );
* // returns 6.0
* // returns <Complex128>[ -4.0, 6.0 ]
*
* v = cround( new Complex128( 9.99999, 0.1 ) );
* // returns <Complex128>
*
* re = real( v );
* // returns 10.0
*
* im = imag( v );
* // returns 0.0
* // returns <Complex128>[ 10.0, 0.0 ]
*
* v = cround( new Complex128( 0.0, 0.0 ) );
* // returns <Complex128>
*
* re = real( v );
* // returns 0.0
*
* im = imag( v );
* // returns 0.0
* // returns <Complex128>[ 0.0, 0.0 ]
*
* v = cround( new Complex128( NaN, NaN ) );
* // returns <Complex128>
*
* re = real( v );
* // returns NaN
*
* im = imag( v );
* // returns NaN
* // returns <Complex128>[ NaN, NaN ]
*/

// MODULES //
Expand Down
34 changes: 4 additions & 30 deletions lib/node_modules/@stdlib/math/base/special/cround/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,18 @@ var imag = require( '@stdlib/complex/float64/imag' );
*
* @example
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
* var real = require( '@stdlib/complex/float64/real' );
* var imag = require( '@stdlib/complex/float64/imag' );
*
* var v = cround( new Complex128( -4.2, 5.5 ) );
* // returns <Complex128>
*
* var re = real( v );
* // returns -4.0
*
* var im = imag( v );
* // returns 6.0
* // returns <Complex128>[ -4.0, 6.0 ]
*
* v = cround( new Complex128( 9.99999, 0.1 ) );
* // returns <Complex128>
*
* re = real( v );
* // returns 10.0
*
* im = imag( v );
* // returns 0.0
* // returns <Complex128>[ 10.0, 0.0 ]
*
* v = cround( new Complex128( 0.0, 0.0 ) );
* // returns <Complex128>
*
* re = real( v );
* // returns 0.0
*
* im = imag( v );
* // returns 0.0
* // returns <Complex128>[ 0.0, 0.0 ]
*
* v = cround( new Complex128( NaN, NaN ) );
* // returns <Complex128>
*
* re = real( v );
* // returns NaN
*
* im = imag( v );
* // returns NaN
* // returns <Complex128>[ NaN, NaN ]
*/
function cround( z ) {
return new Complex128( round( real( z ) ), round( imag( z ) ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,7 @@ var addon = require( './../src/addon.node' );
* var imag = require( '@stdlib/complex/float64/imag' );
*
* var v = cround( new Complex128( -4.2, 5.5 ) );
* // returns <Complex128>
*
* var re = real( v );
* // returns -4
*
* var im = imag( v );
* // returns 6.0
* // returns <Complex128>[ -4.0, 6.0 ]
*/
function cround( z ) {
var v = addon( z );
Expand Down
7 changes: 1 addition & 6 deletions lib/node_modules/@stdlib/math/base/special/cround/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@
* stdlib_complex128_t z = stdlib_complex128( -4.2, 5.5 );
*
* stdlib_complex128_t out = stdlib_base_cround( z );
*
* double re = stdlib_complex128_real( out );
* // returns -5.0
*
* double im = stdlib_complex128_imag( out );
* // returns 6.0
* // returns <Complex128>[ -5.0, 6.0 ]
*/
stdlib_complex128_t stdlib_base_cround( const stdlib_complex128_t z ) {
double re;
Expand Down