@stdlib/constants-complex64-nan
v0.2.2
Published
Canonical single-precision complex floating-point NaN.
Downloads
20
Readme
NAN
Canonical single-precision complex floating-point
NaN
.
Installation
npm install @stdlib/constants-complex64-nan
Usage
var COMPLEX64_NAN = require( '@stdlib/constants-complex64-nan' );
COMPLEX64_NAN
Canonical single-precision complex floating-point NaN
.
var realf = require( '@stdlib/complex-float32-real' );
var imagf = require( '@stdlib/complex-float32-imag' );
var re = realf( COMPLEX64_NAN );
// returns NaN
var im = imagf( COMPLEX64_NAN );
// returns NaN
Examples
var realf = require( '@stdlib/complex-float32-real' );
var imagf = require( '@stdlib/complex-float32-imag' );
var Complex64Array = require( '@stdlib/array-complex64' );
var COMPLEX64_NAN = require( '@stdlib/constants-complex64-nan' );
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_NAN );
v = x.get( 0 );
// returns <Complex64>
re = realf( v );
// returns NaN
im = imagf( v );
// returns NaN
See Also
@stdlib/constants-complex128/nan
: canonical double-precision complex floating-point NaN.
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.