Socket
Socket
Sign inDemoInstall

@stdlib/math-base-special-cceil

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stdlib/math-base-special-cceil - npm Package Compare versions

Comparing version 0.0.7 to 0.1.0

CITATION.cff

4

docs/types/index.d.ts

@@ -19,7 +19,7 @@ /*

// TypeScript Version: 2.0
// TypeScript Version: 4.1
/// <reference types="@stdlib/types"/>
import { Complex128 } from '@stdlib/types/object';
import { Complex128 } from '@stdlib/types/complex';

@@ -26,0 +26,0 @@ /**

@@ -44,3 +44,3 @@ /**

var cceil = require( './main.js' );
var main = require( './main.js' );

@@ -50,2 +50,2 @@

module.exports = cceil;
module.exports = main;

@@ -23,2 +23,3 @@ /**

var Complex128 = require( '@stdlib/complex-float64' );
var ceil = require( '@stdlib/math-base-special-ceil' );

@@ -52,3 +53,3 @@ var real = require( '@stdlib/complex-real' );

function cceil( z ) {
return new z.constructor( ceil( real( z ) ), ceil( imag( z ) ) );
return new Complex128( ceil( real( z ) ), ceil( imag( z ) ) );
}

@@ -55,0 +56,0 @@

{
"options": {},
"fields": [
{
"field": "src",
"resolve": true,
"relative": true
},
{
"field": "include",
"resolve": true,
"relative": true
},
{
"field": "libraries",
"resolve": false,
"relative": false
},
{
"field": "libpath",
"resolve": true,
"relative": false
}
],
"confs": [
{
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": [
"options": {
"task": "build"
},
"fields": [
{
"field": "src",
"resolve": true,
"relative": true
},
{
"field": "include",
"resolve": true,
"relative": true
},
{
"field": "libraries",
"resolve": false,
"relative": false
},
{
"field": "libpath",
"resolve": true,
"relative": false
}
],
"confs": [
{
"task": "build",
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": [
"@stdlib/math-base-napi-unary",
"@stdlib/complex-float64",
"@stdlib/complex-reim",
"@stdlib/math-base-special-ceil"
]
}
]
},
{
"task": "benchmark",
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": [
"@stdlib/complex-float64",
"@stdlib/complex-reim",
"@stdlib/math-base-special-ceil"
]
},
{
"task": "examples",
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": [
"@stdlib/complex-float64",
"@stdlib/complex-reim",
"@stdlib/math-base-special-ceil"
]
}
]
}
{
"name": "@stdlib/math-base-special-cceil",
"version": "0.0.7",
"version": "0.1.0",
"description": "Round a double-precision complex floating-point number toward positive infinity.",

@@ -17,2 +17,3 @@ "license": "Apache-2.0",

"main": "./lib",
"gypfile": false,
"directories": {

@@ -22,3 +23,5 @@ "benchmark": "./benchmark",

"example": "./examples",
"include": "./include",
"lib": "./lib",
"src": "./src",
"test": "./test"

@@ -42,20 +45,23 @@ },

"dependencies": {
"@stdlib/complex-imag": "^0.0.x",
"@stdlib/complex-real": "^0.0.x",
"@stdlib/math-base-special-ceil": "^0.0.x",
"@stdlib/types": "^0.0.x",
"@stdlib/utils-library-manifest": "^0.0.x"
"@stdlib/complex-float64": "^0.1.0",
"@stdlib/complex-imag": "^0.1.0",
"@stdlib/complex-real": "^0.1.0",
"@stdlib/complex-reim": "^0.1.0",
"@stdlib/math-base-napi-unary": "^0.1.0",
"@stdlib/math-base-special-ceil": "^0.1.0",
"@stdlib/types": "^0.1.0",
"@stdlib/utils-library-manifest": "^0.1.0"
},
"devDependencies": {
"@stdlib/bench": "^0.0.x",
"@stdlib/complex-float64": "^0.0.x",
"@stdlib/constants-float64-ninf": "^0.0.x",
"@stdlib/constants-float64-pinf": "^0.0.x",
"@stdlib/math-base-assert-is-nan": "^0.0.x",
"@stdlib/math-base-assert-is-negative-zero": "^0.0.x",
"@stdlib/math-base-assert-is-positive-zero": "^0.0.x",
"@stdlib/random-base-uniform": "^0.0.x",
"@stdlib/bench": "^0.1.0",
"@stdlib/constants-float64-ninf": "^0.1.0",
"@stdlib/constants-float64-pinf": "^0.1.0",
"@stdlib/math-base-assert-is-nan": "^0.1.0",
"@stdlib/math-base-assert-is-negative-zero": "^0.1.0",
"@stdlib/math-base-assert-is-positive-zero": "^0.1.0",
"@stdlib/random-base-uniform": "^0.0.6",
"@stdlib/utils-try-require": "^0.1.0",
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
"istanbul": "^0.4.1",
"tap-spec": "5.x.x"
"tap-min": "git+https://github.com/Planeshifter/tap-min.git"
},

@@ -94,5 +100,5 @@ "engines": {

"funding": {
"type": "patreon",
"url": "https://www.patreon.com/athan"
"type": "opencollective",
"url": "https://opencollective.com/stdlib"
}
}

@@ -21,2 +21,13 @@ <!--

<details>
<summary>
About stdlib...
</summary>
<p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
<p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
<p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
<p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
</details>
# cceil

@@ -125,6 +136,15 @@

```c
#include <complex.h>
#include "stdlib/complex/float64.h"
#include "stdlib/complex/real.h"
#include "stdlib/complex/imag.h"
double complex y = stdlib_base_cceil( 2.5-1.5*I );
// returns 3.0-1.0*I
stdlib_complex128_t z = stdlib_complex128( 2.5, -1.5 );
stdlib_complex128_t out = stdlib_base_cceil( z );
double re = stdlib_real( out );
// returns 3.0
double im = stdlib_imag( out );
// returns -1.0
```

@@ -134,6 +154,6 @@

- **z**: `[in] double complex` input value.
- **z**: `[in] stdlib_complex128_t` input value.
```c
double complex stdlib_base_cceil( const double complex z );
stdlib_complex128_t stdlib_base_cceil( const stdlib_complex128_t z );
```

@@ -161,10 +181,20 @@

#include "stdlib/math/base/special/cceil.h"
#include "stdlib/complex/float64.h"
#include "stdlib/complex/reim.h"
#include <stdio.h>
#include <complex.h>
int main() {
double complex x[] = { 3.14+1.5*I, -3.14-1.5*I, 0.0+0.0*I, 0.0/0.0+0.0/0.0*I };
int main( void ) {
const stdlib_complex128_t x[] = {
stdlib_complex128( 3.14, 1.5 ),
stdlib_complex128( -3.14, -1.5 ),
stdlib_complex128( 0.0, 0.0 ),
stdlib_complex128( 0.0/0.0, 0.0/0.0 )
};
double complex v;
double complex y;
stdlib_complex128_t v;
stdlib_complex128_t y;
double re1;
double im1;
double re2;
double im2;
int i;

@@ -174,3 +204,5 @@ for ( i = 0; i < 4; i++ ) {

y = stdlib_base_cceil( v );
printf( "cceil(%lf + %lfi) = %lf + %lfi\n", creal( v ), cimag( v ), creal( y ), cimag( y ) );
stdlib_reim( v, &re1, &im1 );
stdlib_reim( y, &re2, &im2 );
printf( "cceil(%lf + %lfi) = %lf + %lfi\n", re1, im1, re2, im2 );
}

@@ -196,5 +228,5 @@ }

- <span class="package-name">[`@stdlib/math/base/special/cceiln`][@stdlib/math/base/special/cceiln]</span><span class="delimiter">: </span><span class="description">round a complex number to the nearest multiple of 10^n toward positive infinity.</span>
- <span class="package-name">[`@stdlib/math/base/special/cfloor`][@stdlib/math/base/special/cfloor]</span><span class="delimiter">: </span><span class="description">round a complex number toward negative infinity.</span>
- <span class="package-name">[`@stdlib/math/base/special/cround`][@stdlib/math/base/special/cround]</span><span class="delimiter">: </span><span class="description">round a complex number to the nearest integer.</span>
- <span class="package-name">[`@stdlib/math-base/special/cceiln`][@stdlib/math/base/special/cceiln]</span><span class="delimiter">: </span><span class="description">round a complex number to the nearest multiple of 10^n toward positive infinity.</span>
- <span class="package-name">[`@stdlib/math-base/special/cfloor`][@stdlib/math/base/special/cfloor]</span><span class="delimiter">: </span><span class="description">round a complex number toward negative infinity.</span>
- <span class="package-name">[`@stdlib/math-base/special/cround`][@stdlib/math/base/special/cround]</span><span class="delimiter">: </span><span class="description">round a complex number to the nearest integer.</span>

@@ -231,3 +263,3 @@ </section>

Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].

@@ -245,4 +277,4 @@ </section>

[test-image]: https://github.com/stdlib-js/math-base-special-cceil/actions/workflows/test.yml/badge.svg
[test-url]: https://github.com/stdlib-js/math-base-special-cceil/actions/workflows/test.yml
[test-image]: https://github.com/stdlib-js/math-base-special-cceil/actions/workflows/test.yml/badge.svg?branch=v0.1.0
[test-url]: https://github.com/stdlib-js/math-base-special-cceil/actions/workflows/test.yml?query=branch:v0.1.0

@@ -259,2 +291,9 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-cceil/main.svg

[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
[chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
[stdlib]: https://github.com/stdlib-js/stdlib
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
[umd]: https://github.com/umdjs/umd

@@ -266,10 +305,4 @@ [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

[esm-url]: https://github.com/stdlib-js/math-base-special-cceil/tree/esm
[branches-url]: https://github.com/stdlib-js/math-base-special-cceil/blob/main/branches.md
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
[chat-url]: https://gitter.im/stdlib-js/stdlib/
[stdlib]: https://github.com/stdlib-js/stdlib
[stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/math-base-special-cceil/main/LICENSE

@@ -276,0 +309,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc