0.2.1 • Published 3 months ago

@stdlib/constants-complex64-zero v0.2.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 months ago

ZERO

NPM version Build Status Coverage Status

Single-precision complex floating-point zero.

Installation

npm install @stdlib/constants-complex64-zero

Usage

var COMPLEX64_ZERO = require( '@stdlib/constants-complex64-zero' );

COMPLEX64_ZERO

Single-precision complex floating-point zero.

var realf = require( '@stdlib/complex-realf' );
var imagf = require( '@stdlib/complex-imagf' );

var re = realf( COMPLEX64_ZERO );
// returns 0.0

var im = imagf( COMPLEX64_ZERO );
// returns 0.0

Examples

var realf = require( '@stdlib/complex-realf' );
var imagf = require( '@stdlib/complex-imagf' );
var Complex64Array = require( '@stdlib/array-complex64' );
var COMPLEX64_ZERO = require( '@stdlib/constants-complex64-zero' );

var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
// returns <Complex64Array>

var v = x.get( 0 );
// returns <Complex64>

var re = realf( v );
// returns 1.0

var im = imagf( v );
// returns 2.0

x.fill( COMPLEX64_ZERO );

v = x.get( 0 );
// returns <Complex64>

re = realf( v );
// returns 0.0

im = imagf( v );
// returns 0.0

See Also


Notice

This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.

For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.

Community

Chat


License

See LICENSE.

Copyright

Copyright © 2016-2024. The Stdlib Authors.