Standard library base complex number math functions.
var ns = require( '@stdlib/math/base/complex' );Standard library base complex number math functions.
var o = ns;
// returns {...}The namespace contains the following functions for working with complex numbers:
cabs( re, im ): compute an absolute value of a complex number.cabs2( re, im ): compute the squared absolute value of a complex number.cadd( [out,] re1, im1, re2, im2 ): add two complex numbers.cceil( [out,] re, im ): round a complex number toward positive infinity.cceiln( [out,] re, im, n ): round a complex number to the nearest multiple of10^ntoward positive infinity.ccis( [out,] re, im ): compute the cis function of a complex number.cdiv( [out,] re1, im1, re2, im2 ): divide two complex numbers.cfloor( [out,] re, im ): round a complex number toward negative infinity.cfloorn( [out,] re, im, n ): round a complex number to the nearest multiple of10^ntoward negative infinity.cinv( [out,] re1, im1 ): compute the inverse of a complex number.cmul( [out,] re1, im1, re2, im2 ): multiply two complex numbers.cphase( re, im ): compute the argument of a complex number in radians.cpolar( [out,] re, im ): compute the absolute value and phase of a complex number.cround( [out,] re, im ): round a complex number to the nearest integer.croundn( [out,] re, im, n ): round a complex number to the nearest multiple of10^n.csub( [out,] re1, im1, re2, im2 ): subtract two complex numbers.
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/math/base/complex' );
console.log( objectKeys( ns ) );