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
6 changes: 3 additions & 3 deletions lib/node_modules/@stdlib/math/base/special/cceil/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.

# cceil

> Round a double-precision complex floating-point number toward positive infinity.
> Round each component of a double-precision complex floating-point number toward positive infinity.

<section class="usage">

Expand All @@ -32,7 +32,7 @@ var cceil = require( '@stdlib/math/base/special/cceil' );

#### cceil( z )

Rounds a double-precision complex floating-point number toward positive infinity.
Rounds each component of a double-precision complex floating-point number toward positive infinity.

```javascript
var Complex128 = require( '@stdlib/complex/float64/ctor' );
Expand Down Expand Up @@ -106,7 +106,7 @@ for ( i = 0; i < 100; i++ ) {

#### stdlib_base_cceil( z )

Rounds a double-precision complex floating-point number toward positive infinity.
Rounds each component of a double-precision complex floating-point number toward positive infinity.

```c
#include "stdlib/complex/float64/ctor.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,18 @@ static double rand_double( void ) {
static double benchmark( void ) {
double complex x;
double complex y;
double v[ 100 ];
double elapsed;
double t;
double v;
int i;

for ( i = 0; i < 100; i++ ) {
v[ i ] = ( 1000.0 * rand_double() ) - 500.0;
}

t = tic();
for ( i = 0; i < ITERATIONS; i++ ) {
v = ( 1000.0*rand_double() ) - 500.0;
x = v + v*I;
x = v[ i % 100 ] + v[ i % 100 ] *I;
y = stdlib_base_ceil( creal( x ) ) + stdlib_base_ceil( cimag( x ) )*I;
if ( creal( y ) != creal( y ) ) {
printf( "unexpected result\n" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,24 @@ static double rand_double( void ) {
*/
static double benchmark( void ) {
double elapsed;
double re;
double im;
double v[ 100 ];
double re;
double im;
double t;
double v;
int i;

stdlib_complex128_t x;
stdlib_complex128_t y;
stdlib_complex128_t x;
stdlib_complex128_t y;

for ( i = 0; i < 100; i++ ) {
v[ i ] = ( 1000.0 * rand_double() ) - 500.0;
}

t = tic();
for ( i = 0; i < ITERATIONS; i++ ) {
v = ( 1000.0*rand_double() ) - 500.0;
x = stdlib_complex128( v, v );
x = stdlib_complex128( v[ i % 100 ], v[ i % 100 ] );
y = stdlib_base_cceil( x );
stdlib_complex128_reim( y, &re, &im );
stdlib_complex128_reim( y, &re, &im );
if ( re != re ) {
printf( "unexpected result\n" );
break;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{{alias}}( z )
Rounds a double-precision complex floating-point number toward positive
infinity.
Rounds each component of a double-precision complex floating-point number
toward positive infinity.

Parameters
----------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import { Complex128 } from '@stdlib/types/complex';

/**
* Rounds a double-precision complex floating-point number toward positive infinity.
* Rounds each component of a double-precision complex floating-point number toward positive infinity.
*
* @param z - input value
* @returns result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extern "C" {
#endif

/**
* Rounds a double-precision complex floating-point number toward positive infinity.
* Rounds each component of a double-precision complex floating-point number toward positive infinity.
*/
stdlib_complex128_t stdlib_base_cceil( const stdlib_complex128_t z );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'use strict';

/**
* Round a double-precision floating-point complex number toward positive infinity.
* Round each component of a double-precision complex floating-point number toward positive infinity.
*
* @module @stdlib/math/base/special/cceil
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var imag = require( '@stdlib/complex/float64/imag' );
// MAIN //

/**
* Rounds a complex number toward positive infinity.
* Rounds each component of a double-precision complex floating-point number toward positive infinity.
*
* @param {Complex128} z - complex number
* @returns {Complex128} result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var addon = require( './../src/addon.node' );
// MAIN //

/**
* Rounds a complex number toward positive infinity.
* Rounds each component of a double-precision complex floating-point number toward positive infinity.
*
* @private
* @param {Complex128} z - complex number
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@stdlib/math/base/special/cceil",
"version": "0.0.0",
"description": "Round a double-precision complex floating-point number toward positive infinity.",
"description": "Round each component of a double-precision complex floating-point number toward positive infinity.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "stdlib/complex/float64/reim.h"

/**
* Rounds a double-precision complex floating-point number toward positive infinity.
* Rounds each component of a double-precision complex floating-point number toward positive infinity.
*
* @param z input value
* @return result
Expand Down
Loading