-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97c49f3
commit faa1a2d
Showing
26 changed files
with
1,124 additions
and
315 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Copyright (c) 2016-2023 The Stdlib Authors. | ||
Copyright (c) 2016-2024 The Stdlib Authors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<!-- | ||
@license Apache-2.0 | ||
Copyright (c) 2024 The Stdlib Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
# ZERO | ||
|
||
> Double-precision complex floating-point zero. | ||
<section class="usage"> | ||
|
||
## Usage | ||
|
||
```javascript | ||
var COMPLEX128_ZERO = require( '@stdlib/constants/complex128/zero' ); | ||
``` | ||
|
||
#### COMPLEX128_ZERO | ||
|
||
Double-precision complex floating-point zero. | ||
|
||
```javascript | ||
var real = require( '@stdlib/complex/real' ); | ||
var imag = require( '@stdlib/complex/imag' ); | ||
|
||
var re = real( COMPLEX128_ZERO ); | ||
// returns 0.0 | ||
|
||
var im = imag( COMPLEX128_ZERO ); | ||
// returns 0.0 | ||
``` | ||
|
||
</section> | ||
|
||
<!-- /.usage --> | ||
|
||
<section class="examples"> | ||
|
||
## Examples | ||
|
||
<!-- eslint no-undef: "error" --> | ||
|
||
```javascript | ||
var real = require( '@stdlib/complex/real' ); | ||
var imag = require( '@stdlib/complex/imag' ); | ||
var Complex128Array = require( '@stdlib/array/complex128' ); | ||
var COMPLEX128_ZERO = require( '@stdlib/constants/complex128/zero' ); | ||
|
||
var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] ); | ||
// returns <Complex128Array> | ||
|
||
var v = x.get( 0 ); | ||
// returns <Complex128> | ||
|
||
var re = real( v ); | ||
// returns 1.0 | ||
|
||
var im = imag( v ); | ||
// returns 2.0 | ||
|
||
x.fill( COMPLEX128_ZERO ); | ||
|
||
v = x.get( 0 ); | ||
// returns <Complex128> | ||
|
||
re = real( v ); | ||
// returns 0.0 | ||
|
||
im = imag( v ); | ||
// returns 0.0 | ||
``` | ||
|
||
</section> | ||
|
||
<!-- /.examples --> | ||
|
||
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. --> | ||
|
||
<section class="related"> | ||
|
||
<!-- /.related --> | ||
|
||
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> | ||
|
||
<section class="links"> | ||
|
||
</section> | ||
|
||
<!-- /.links --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
{{alias}} | ||
Double-precision complex floating-point zero. | ||
|
||
Examples | ||
-------- | ||
> {{alias}} | ||
<Complex128> | ||
|
||
See Also | ||
-------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* @license Apache-2.0 | ||
* | ||
* Copyright (c) 2024 The Stdlib Authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
// TypeScript Version: 4.1 | ||
|
||
/// <reference types="@stdlib/types"/> | ||
|
||
import { Complex128 } from '@stdlib/types/complex'; | ||
|
||
/** | ||
* Double-precision complex floating-point zero. | ||
* | ||
* @example | ||
* var zero = COMPLEX128_ZERO; | ||
* // returns <Complex128> | ||
*/ | ||
declare const COMPLEX128_ZERO: Complex128; | ||
|
||
|
||
// EXPORTS // | ||
|
||
export = COMPLEX128_ZERO; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* @license Apache-2.0 | ||
* | ||
* Copyright (c) 2024 The Stdlib Authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import COMPLEX128_ZERO = require( './index' ); | ||
|
||
|
||
// TESTS // | ||
|
||
// The export is a complex number... | ||
{ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions | ||
COMPLEX128_ZERO; // $ExpectType Complex128 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* @license Apache-2.0 | ||
* | ||
* Copyright (c) 2024 The Stdlib Authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
var real = require( '@stdlib/complex/real' ); | ||
var imag = require( '@stdlib/complex/imag' ); | ||
var Complex128Array = require( '@stdlib/array/complex128' ); | ||
var COMPLEX128_ZERO = require( './../lib' ); | ||
|
||
var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0 ] ); | ||
// returns <Complex128Array> | ||
|
||
var v = x.get( 0 ); | ||
// returns <Complex128> | ||
|
||
var re = real( v ); | ||
console.log( re ); | ||
// => 1.0 | ||
|
||
var im = imag( v ); | ||
console.log( im ); | ||
// => 2.0 | ||
|
||
x.fill( COMPLEX128_ZERO ); | ||
|
||
v = x.get( 0 ); | ||
// returns <Complex128> | ||
|
||
re = real( v ); | ||
console.log( re ); | ||
// => 0.0 | ||
|
||
im = imag( v ); | ||
console.log( im ); | ||
// => 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* @license Apache-2.0 | ||
* | ||
* Copyright (c) 2024 The Stdlib Authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* Double-precision complex floating-point zero. | ||
* | ||
* @module @stdlib/constants/complex128/zero | ||
* @type {Complex128} | ||
* | ||
* @example | ||
* var COMPLEX128_ZERO = require( '@stdlib/constants/complex128/zero' ); | ||
* // returns <Complex128> | ||
*/ | ||
|
||
// MODULES // | ||
|
||
var Complex128 = require( '@stdlib/complex/float64' ); | ||
|
||
|
||
// MAIN // | ||
|
||
/** | ||
* Double-precision complex floating-point zero. | ||
* | ||
* @constant | ||
* @type {Complex128} | ||
*/ | ||
var COMPLEX128_ZERO = new Complex128( 0.0, 0.0 ); | ||
|
||
|
||
// EXPORTS // | ||
|
||
module.exports = COMPLEX128_ZERO; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"name": "@stdlib/constants/complex128/zero", | ||
"version": "0.0.0", | ||
"description": "Double-precision complex floating-point zero.", | ||
"license": "Apache-2.0", | ||
"author": { | ||
"name": "The Stdlib Authors", | ||
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "The Stdlib Authors", | ||
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors" | ||
} | ||
], | ||
"main": "./lib", | ||
"directories": { | ||
"doc": "./docs", | ||
"example": "./examples", | ||
"lib": "./lib", | ||
"test": "./test" | ||
}, | ||
"types": "./docs/types", | ||
"scripts": {}, | ||
"homepage": "https://github.com/stdlib-js/stdlib", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/stdlib-js/stdlib.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/stdlib-js/stdlib/issues" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": {}, | ||
"engines": { | ||
"node": ">=0.10.0", | ||
"npm": ">2.7.0" | ||
}, | ||
"os": [ | ||
"aix", | ||
"darwin", | ||
"freebsd", | ||
"linux", | ||
"macos", | ||
"openbsd", | ||
"sunos", | ||
"win32", | ||
"windows" | ||
], | ||
"keywords": [ | ||
"stdlib", | ||
"stdmath", | ||
"constant", | ||
"const", | ||
"mathematics", | ||
"math", | ||
"zero", | ||
"complex", | ||
"cmplx", | ||
"double", | ||
"dbl", | ||
"precision", | ||
"floating-point", | ||
"float64", | ||
"complex128", | ||
"cmplx128" | ||
] | ||
} |
Oops, something went wrong.