We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.
The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.
When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.
To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
Complex Numbers
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url]
Complex number data types.
bash
npm install @stdlib/complex
javascript
var ns = require( '@stdlib/complex' );
#### ns
Complex number data types.
javascript
var o = ns;
// returns {...}
The namespace contains the following sub-namespaces:
base
][@stdlib/complex/base]: base (i.e., lower-level) complex number functions.
- [float32
][@stdlib/complex/float32]: single-precision complex floating-point number functions.
- [float64
][@stdlib/complex/float64]: double-precision complex floating-point number functions.
complex( real, imag[, dtype] )
][@stdlib/complex/cmplx]: create a complex number.
- [ctors( dtype )
][@stdlib/complex/ctors]: complex number constructors.
- [dtype( value )
][@stdlib/complex/dtype]: return the data type of a complex number.
- [dtypes()
][@stdlib/complex/dtypes]: list of complex number data types.
- [promotionRules( [dtype1, dtype2] )
][@stdlib/complex/promotion-rules]: return the complex number data type with the smallest size and closest "kind" to which data types can be safely cast.
- [reviveComplex( key, value )
][@stdlib/complex/reviver]: revive a JSON-serialized complex number.
javascript
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/complex' );
console.log( objectKeys( ns ) );