diff --git a/lib/node_modules/@stdlib/math/base/special/cfloorn/README.md b/lib/node_modules/@stdlib/math/base/special/cfloorn/README.md index 034b8ce830d1..65e7bd025b44 100644 --- a/lib/node_modules/@stdlib/math/base/special/cfloorn/README.md +++ b/lib/node_modules/@stdlib/math/base/special/cfloorn/README.md @@ -36,47 +36,21 @@ 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' ); // Round components to 2 decimal places: var v = cfloorn( new Complex128( -3.141592653589793, 3.141592653589793 ), -2 ); -// returns - -var re = real( v ); -// returns -3.15 - -var im = imag( v ); -// returns 3.14 +// returns [ -3.15, 3.14 ] // If n = 0, `cfloorn` behaves like `cfloor`: v = cfloorn( new Complex128( -3.141592653589793, 3.141592653589793 ), 0 ); -// returns - -re = real( v ); -// returns -4.0 - -im = imag( v ); -// returns 3.0 +// returns [ -4.0, 3.0 ] // Round components to the nearest thousand: v = cfloorn( new Complex128( -12368.0, 12368.0 ), 3 ); -// returns - -re = real( v ); -// returns -13000.0 - -im = imag( v ); -// returns 12000.0 +// returns [ -13000.0, 12000.0 ] v = cfloorn( new Complex128( NaN, NaN ), 0 ); -// returns - -re = real( v ); -// returns NaN - -im = imag( v ); -// returns NaN +// returns [ NaN, NaN ] ``` @@ -91,21 +65,13 @@ im = imag( v ); ```javascript var Complex128 = require( '@stdlib/complex/float64/ctor' ); - var real = require( '@stdlib/complex/float64/real' ); - var imag = require( '@stdlib/complex/float64/imag' ); var x = -0.2 - 0.1; // returns -0.30000000000000004 // Should round components to 0.3: var v = cfloorn( new Complex128( x, x ), -16 ); - // returns - - var re = real( v ); - // returns -0.3000000000000001 - - var im = imag( v ); - // returns -0.3000000000000001 + // returns [ -0.3000000000000001, -0.3000000000000001 ] ``` diff --git a/lib/node_modules/@stdlib/math/base/special/cfloorn/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/cfloorn/docs/repl.txt index 0dc868dbccad..b6ee61af3120 100644 --- a/lib/node_modules/@stdlib/math/base/special/cfloorn/docs/repl.txt +++ b/lib/node_modules/@stdlib/math/base/special/cfloorn/docs/repl.txt @@ -19,11 +19,7 @@ Examples -------- > var v = {{alias}}( new {{alias:@stdlib/complex/float64/ctor}}( 5.555, -3.333 ), -2 ) - - > var re = {{alias:@stdlib/complex/float64/real}}( v ) - 5.55 - > var im = {{alias:@stdlib/complex/float64/imag}}( v ) - -3.34 + [ 5.55, -3.34 ] See Also -------- diff --git a/lib/node_modules/@stdlib/math/base/special/cfloorn/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/cfloorn/docs/types/index.d.ts index 93a264ee97c1..ab874503f555 100644 --- a/lib/node_modules/@stdlib/math/base/special/cfloorn/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/base/special/cfloorn/docs/types/index.d.ts @@ -31,17 +31,9 @@ import { Complex128 } from '@stdlib/types/complex'; * * @example * var Complex128 = require( '@stdlib/complex/float64/ctor' ); -* var real = require( '@stdlib/complex/float64/real' ); -* var imag = require( '@stdlib/complex/float64/imag' ); * * var v = cfloorn( new Complex128( 5.555, -3.333 ), -2 ); -* // returns -* -* var re = real( v ); -* // returns 5.55 -* -* var im = imag( v ); -* // returns -3.34 +* // returns [ 5.55, -3.34 ] */ declare function cfloorn( z: Complex128, n: number ): Complex128; diff --git a/lib/node_modules/@stdlib/math/base/special/cfloorn/lib/index.js b/lib/node_modules/@stdlib/math/base/special/cfloorn/lib/index.js index bfb6ef5d1723..a8da9f3ff6e9 100644 --- a/lib/node_modules/@stdlib/math/base/special/cfloorn/lib/index.js +++ b/lib/node_modules/@stdlib/math/base/special/cfloorn/lib/index.js @@ -25,48 +25,22 @@ * * @example * var Complex128 = require( '@stdlib/complex/float64/ctor' ); -* var real = require( '@stdlib/complex/float64/real' ); -* var imag = require( '@stdlib/complex/float64/imag' ); * var cfloorn = require( '@stdlib/math/base/special/cfloorn' ); * * // Round components to 2 decimal places: * var v = cfloorn( new Complex128( -3.141592653589793, 3.141592653589793 ), -2 ); -* // returns -* -* var re = real( v ); -* // returns -3.15 -* -* var im = imag( v ); -* // returns 3.14 +* // returns [ -3.15, 3.14 ] * * // If n = 0, `cfloorn` behaves like `cfloor`: * v = cfloorn( new Complex128( 9.99999, 0.1 ), 0 ); -* // returns -* -* re = real( v ); -* // returns 9.0 -* -* im = imag( v ); -* // returns 0.0 +* // returns [ 9.0, 0.0 ] * * // Round components to the nearest thousand: * v = cfloorn( new Complex128( 12368.0, -12368.0 ), 2 ); -* // returns -* -* re = real( v ); -* // returns 12300.0 -* -* im = imag( v ); -* // returns -12400.0 +* // returns [ 12300.0, -12400.0 ] * * v = cfloorn( new Complex128( NaN, NaN ), 2 ); -* // returns -* -* re = real( v ); -* // returns NaN -* -* im = imag( v ); -* // returns NaN +* // returns [ NaN, NaN ] */ // MODULES // diff --git a/lib/node_modules/@stdlib/math/base/special/cfloorn/lib/main.js b/lib/node_modules/@stdlib/math/base/special/cfloorn/lib/main.js index 0de1c74a66e6..8db78ebf83f3 100644 --- a/lib/node_modules/@stdlib/math/base/special/cfloorn/lib/main.js +++ b/lib/node_modules/@stdlib/math/base/special/cfloorn/lib/main.js @@ -37,47 +37,21 @@ 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' ); * * // Round components to 2 decimal places: * var v = cfloorn( new Complex128( -3.141592653589793, 3.141592653589793 ), -2 ); -* // returns -* -* var re = real( v ); -* // returns -3.15 -* -* var im = imag( v ); -* // returns 3.14 +* // returns [ -3.15, 3.14 ] * * // If n = 0, `cfloorn` behaves like `cfloor`: * v = cfloorn( new Complex128( 9.99999, 0.1 ), 0 ); -* // returns -* -* re = real( v ); -* // returns 9.0 -* -* im = imag( v ); -* // returns 0.0 +* // returns [ 9.0, 0.0 ] * * // Round components to the nearest thousand: * v = cfloorn( new Complex128( 12368.0, -12368.0 ), 2 ); -* // returns -* -* re = real( v ); -* // returns 12300 -* -* im = imag( v ); -* // returns -12400 +* // returns [ 12300.0, -12400.0 ] * * v = cfloorn( new Complex128( NaN, NaN ), 2 ); -* // returns -* -* re = real( v ); -* // returns NaN -* -* im = imag( v ); -* // returns NaN +* // returns [ NaN, NaN ] */ function cfloorn( z, n ) { return new Complex128( floorn( real( z ), n ), floorn( imag( z ), n ) ); diff --git a/lib/node_modules/@stdlib/math/base/special/cfloorn/lib/native.js b/lib/node_modules/@stdlib/math/base/special/cfloorn/lib/native.js index 4be9f2438b46..05c7b2d286a9 100644 --- a/lib/node_modules/@stdlib/math/base/special/cfloorn/lib/native.js +++ b/lib/node_modules/@stdlib/math/base/special/cfloorn/lib/native.js @@ -36,47 +36,21 @@ var addon = require( './../src/addon.node' ); * * @example * var Complex128 = require( '@stdlib/complex/float64/ctor' ); -* var real = require( '@stdlib/complex/float64/real' ); -* var imag = require( '@stdlib/complex/float64/imag' ); * * // Round components to 2 decimal places: * var v = cfloorn( new Complex128( -3.141592653589793, 3.141592653589793 ), -2 ); -* // returns -* -* var re = real( v ); -* // returns -3.15 -* -* var im = imag( v ); -* // returns 3.14 +* // returns [ -3.15, 3.14 ] * * // If n = 0, `cfloorn` behaves like `cfloor`: * v = cfloorn( new Complex128( 9.99999, 0.1 ), 0 ); -* // returns -* -* re = real( v ); -* // returns 9.0 -* -* im = imag( v ); -* // returns 0.0 +* // returns [ 9.0, 0.0 ] * * // Round components to the nearest thousand: * v = cfloorn( new Complex128( 12368.0, -12368.0 ), 2 ); -* // returns -* -* re = real( v ); -* // returns 12300 -* -* im = imag( v ); -* // returns -12400 +* // returns [ 12300.0, -12400.0 ] * * v = cfloorn( new Complex128( NaN, NaN ), 2 ); -* // returns -* -* re = real( v ); -* // returns NaN -* -* im = imag( v ); -* // returns NaN +* // returns [ NaN, NaN ] */ function cfloorn( z, n ) { var v = addon( z, n );