Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
/* eslint-disable max-lines */

import add = require( '@stdlib/complex/float32/base/add' );
import add3 = require( '@stdlib/complex/float32/base/add3' );
import assert = require( '@stdlib/complex/float32/base/assert' );
import identity = require( '@stdlib/complex/float32/base/identity' );
import mul = require( '@stdlib/complex/float32/base/mul' );
import muladd = require( '@stdlib/complex/float32/base/mul-add' );
import neg = require( '@stdlib/complex/float32/base/neg' );
import scale = require( '@stdlib/complex/float32/base/scale' );
import sub = require( '@stdlib/complex/float32/base/sub' );
Expand Down Expand Up @@ -68,6 +70,44 @@ interface Namespace {
*/
add: typeof add;

/**
* Computes the sum of three single-precision complex floating-point numbers.
*
* @param z1 - first complex number
* @param z2 - second complex number
* @param z3 - third complex number
* @returns result
*
* @example
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
*
* var z = new Complex64( 5.0, 3.0 );
*
* var out = ns.add3( z, z, z );
* // returns <Complex64>[ 15.0, 9.0 ]
*
* @example
* var Float32Array = require( '@stdlib/array/float32' );
*
* var out = new Float32Array( 2 );
* var v = ns.add3.assign( 5.0, 3.0, 5.0, 3.0, 5.0, 3.0, out, 1, 0 );
* // returns <Float32Array>[ 15.0, 9.0 ]
*
* var bool = ( out === v );
* // returns true
*
* @example
* var Float32Array = require( '@stdlib/array/float32' );
*
* var z1 = new Float32Array( [ 5.0, 3.0 ] );
* var z2 = new Float32Array( [ 5.0, 3.0 ] );
* var z3 = new Float32Array( [ 5.0, 3.0 ] );
*
* var out = ns.add3.strided( z1, 1, 0, z2, 1, 0, z3, 1, 0, new Float32Array( 2 ), 1, 0 );
* // returns <Float32Array>[ 15.0, 9.0 ]
*/
add3: typeof add3;

/**
* Base (i.e., lower-level) single-precision complex number assertion functions.
*/
Expand Down Expand Up @@ -124,6 +164,42 @@ interface Namespace {
*/
mul: typeof mul;

/**
* Performs a multiply-add operation involving three single-precision complex floating-point numbers.
*
* @param alpha - complex number
* @param x - complex number
* @param y - complex number
* @returns result
*
* @example
* var Complex64 = require( '@stdlib/complex/float32/ctor' );
*
* var z1 = new Complex64( 5.0, 3.0 );
* var z2 = new Complex64( -2.0, 1.0 );
* var z3 = new Complex64( 7.0, -8.0 );
*
* var out = ns.muladd( z1, z2, z3 );
* // returns <Complex64>[ -6.0, -9.0 ]
*
* @example
* var Float32Array = require( '@stdlib/array/float32' );
*
* var out = ns.muladd.assign( 5.0, 3.0, -2.0, 1.0, 7.0, -8.0, new Float32Array( 2 ), 1, 0 );
* // returns <Float32Array>[ -6.0, -9.0 ]
*
* @example
* var Float32Array = require( '@stdlib/array/float32' );
*
* var alpha = new Float32Array( [ 5.0, 3.0 ] );
* var x = new Float32Array( [ -2.0, 1.0 ] );
* var y = new Float32Array( [ 7.0, -8.0 ] );
*
* var out = ns.muladd.strided( alpha, 1, 0, x, 1, 0, y, 1, 0, new Float32Array( 2 ), 1, 0 );
* // returns <Float32Array>[ -6.0, -9.0 ]
*/
muladd: typeof muladd;

/**
* Negates a single-precision complex floating-point number.
*
Expand Down