0.2.1 • Published 2 months ago
@stdlib/constants-complex128-zero v0.2.1
ZERO
Double-precision complex floating-point zero.
Installation
npm install @stdlib/constants-complex128-zero
Usage
var COMPLEX128_ZERO = require( '@stdlib/constants-complex128-zero' );
COMPLEX128_ZERO
Double-precision complex floating-point zero.
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
Examples
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
See Also
@stdlib/constants-complex64/zero
: single-precision complex floating-point zero.
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
License
See LICENSE.
Copyright
Copyright © 2016-2024. The Stdlib Authors.