@stdlib/complex
v0.3.3
Published
Complex numbers.
Downloads
100,146
Readme
Complex Numbers
Complex number data types.
Installation
npm install @stdlib/complex
Usage
var ns = require( '@stdlib/complex' );
ns
Complex number data types.
var o = ns;
// returns {...}
The namespace contains the following sub-namespaces:
base
: base (i.e., lower-level) complex number functions.float32
: single-precision complex floating-point number functions.float64
: double-precision complex floating-point number functions.
The namespace contains the following APIs:
complex( real, imag[, dtype] )
: create a complex number.ctors( dtype )
: complex number constructors.dtype( value )
: return the data type of a complex number.dtypes()
: list of complex number data types.promotionRules( [dtype1, dtype2] )
: return the complex number data type with the smallest size and closest "kind" to which data types can be safely cast.reviveComplex( key, value )
: revive a JSON-serialized complex number.
Examples
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/complex' );
console.log( objectKeys( ns ) );
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.