Skip to content
Open
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/cceiln/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,50 +36,24 @@ 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 z = new Complex128( -3.141592653589793, 3.141592653589793 );
var v = cceiln( z, -2 );
// returns <Complex128>

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

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

// If n = 0, `cceiln` behaves like `cceil`:
z = new Complex128( 9.99999, 0.1 );
v = cceiln( z, 0 );
// returns <Complex128>

re = real( v );
// returns 10.0

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

// Round components to the nearest thousand:
z = new Complex128( 12368.0, -12368.0 );
v = cceiln( z, 3 );
// returns <Complex128>

re = real( v );
// returns 13000.0

im = imag( v );
// returns -12000.0
// returns <Complex128>[ 13000.0, -12000.0 ]

v = cceiln( new Complex128( NaN, NaN ), 2 );
// 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 @@ -18,12 +18,7 @@

Examples
--------
> var out = {{alias}}( new {{alias:@stdlib/complex/float64/ctor}}( 5.555, -3.333 ), -2 )
<Complex128>
> var re = {{alias:@stdlib/complex/float64/real}}( out )
5.56
> var im = {{alias:@stdlib/complex/float64/imag}}( out )
-3.33
> var out = {{alias}}( new {{alias:@stdlib/complex/float64/ctor}}( 5.555, -3.333 ), -2 );

See Also
--------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = cceiln( new Complex128( 5.555, -3.333 ), -2 );
* // returns <Complex128>
*
* var re = real( v );
* // returns 5.56
*
* var im = imag( v );
* // returns -3.33
* // returns <Complex128>[ 5.56, -3.33 ]
*/
declare function cceiln( z: Complex128, n: number ): Complex128;

Expand Down
40 changes: 7 additions & 33 deletions lib/node_modules/@stdlib/math/base/special/cceiln/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,51 +25,25 @@
*
* @example
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
* var real = require( '@stdlib/complex/float64/real' );
* var imag = require( '@stdlib/complex/float64/imag' );
* var cceiln = require( '@stdlib/math/base/special/cceiln' );
*
* // Round components to 2 decimal places:
* var z = new Complex128( -3.141592653589793, 3.141592653589793 )
* var z = new Complex128( -3.141592653589793, 3.141592653589793 );
* var v = cceiln( z, -2 );
* // returns <Complex128>
*
* var re = real( v );
* // returns -3.14
*
* var im = imag( v );
* // returns 3.15
* // returns <Complex128>[ -3.14, 3.15 ]
*
* // If n = 0, `cceiln` behaves like `cceil`:
* z = new Complex128( 9.99999, 0.1 )
* z = new Complex128( 9.99999, 0.1 );
* v = cceiln( z, 0 );
* // returns <Complex128>
*
* re = real( v );
* // returns 10.0
*
* im = imag( v );
* // returns 1.0
* // returns <Complex128>[ 10.0, 1.0 ]
*
* // Round components to the nearest thousand:
* z = new Complex128( 12368.0, -12368.0 )
* z = new Complex128( 12368.0, -12368.0 );
* v = cceiln( z, 3 );
* // returns <Complex128>
*
* re = real( v );
* // returns 13000.0
*
* im = imag( v );
* // returns -12000.0
* // returns <Complex128>[ 13000.0, -12000.0 ]
*
* v = cceiln( new Complex128( NaN, NaN ), 2 );
* // returns <Complex128>
*
* re = real( v );
* // returns NaN
*
* im = imag( v );
* // returns NaN
* // returns <Complex128>[ NaN, NaN ]
*/

// MODULES //
Expand Down
40 changes: 7 additions & 33 deletions lib/node_modules/@stdlib/math/base/special/cceiln/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,50 +37,24 @@ 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 z = new Complex128( -3.141592653589793, 3.141592653589793 )
* var z = new Complex128( -3.141592653589793, 3.141592653589793 );
* var v = cceiln( z, -2 );
* // returns <Complex128>
*
* var re = real( v );
* // returns -3.14
*
* var im = imag( v );
* // returns 3.15
* // returns <Complex128>[ -3.14, 3.15 ]
*
* // If n = 0, `cceiln` behaves like `cceil`:
* z = new Complex128( 9.99999, 0.1 )
* z = new Complex128( 9.99999, 0.1 );
* v = cceiln( z, 0 );
* // returns <Complex128>
*
* re = real( v );
* // returns 10.0
*
* im = imag( v );
* // returns 1.0
* // returns <Complex128>[ 10.0, 1.0 ]
*
* // Round components to the nearest thousand:
* z = new Complex128( 12368.0, -12368.0 )
* z = new Complex128( 12368.0, -12368.0 );
* v = cceiln( z, 3 );
* // returns <Complex128>
*
* re = real( v );
* // returns 13000.0
*
* im = imag( v );
* // returns -12000.0
* // returns <Complex128>[ 13000.0, -12000.0 ]
*
* v = cceiln( new Complex128( NaN, NaN ), 2 );
* // returns <Complex128>
*
* re = real( v );
* // returns NaN
*
* im = imag( v );
* // returns NaN
* // returns <Complex128>[ NaN, NaN ]
*/
function cceiln( z, n ) {
return new Complex128( ceiln( real( z ), n ), ceiln( imag( z ), n ) );
Expand Down
40 changes: 7 additions & 33 deletions lib/node_modules/@stdlib/math/base/special/cceiln/lib/native.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,50 +36,24 @@ 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 z = new Complex128( -3.141592653589793, 3.141592653589793 )
* var z = new Complex128( -3.141592653589793, 3.141592653589793 );
* var v = cceiln( z, -2 );
* // returns <Complex128>
*
* var re = real( v );
* // returns -3.14
*
* var im = imag( v );
* // returns 3.15
* // returns <Complex128>[ -3.14, 3.15 ]
*
* // If n = 0, `cceiln` behaves like `cceil`:
* z = new Complex128( 9.99999, 0.1 )
* z = new Complex128( 9.99999, 0.1 );
* v = cceiln( z, 0 );
* // returns <Complex128>
*
* re = real( v );
* // returns 10.0
*
* im = imag( v );
* // returns 1.0
* // returns <Complex128>[ 10.0, 1.0 ]
*
* // Round components to the nearest thousand:
* z = new Complex128( 12368.0, -12368.0 )
* z = new Complex128( 12368.0, -12368.0 );
* v = cceiln( z, 3 );
* // returns <Complex128>
*
* re = real( v );
* // returns 13000.0
*
* im = imag( v );
* // returns -12000.0
* // returns <Complex128>[ 13000.0, -12000.0 ]
*
* v = cceiln( new Complex128( NaN, NaN ), 2 );
* // returns <Complex128>
*
* re = real( v );
* // returns NaN
*
* im = imag( v );
* // returns NaN
* // returns <Complex128>[ NaN, NaN ]
*/
function cceiln( z, n ) {
var v = addon( z, n );
Expand Down