Skip to content

Latest commit

 

History

History
191 lines (112 loc) · 3.49 KB

File metadata and controls

191 lines (112 loc) · 3.49 KB

zrotg

Constructs a Givens plane rotation.

Usage

var zrotg = require( '@stdlib/blas/base/zrotg' );

zrotg( za, zb )

Constructs a Givens plane rotation provided two single-precision floating-point values a and b.

var Complex128 = require( '@stdlib/complex/float64/ctor' );

var za = new Complex128( 4.0, 3.0 );
// returns <Complex128>

var zb = new Complex128( 0.0, 0.0 );
// returns <Complex128>

var out = zrotg( za, zb );
// out => <Float64Array>[ 4.0, 3.0, 1.0, 0.0, 0.0 ]

The function has the following parameters:

  • za: rotational elimination parameter.
  • za: rotational elimination parameter.

Note that indexing is relative to the first index. To introduce an offset, use typed array views.

Notes

  • zrotg() corresponds to the BLAS level 1 function zrotg.

Examples

var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
var Complex128 = require( '@stdlib/complex/float64/ctor' );
var zrotg = require( '@stdlib/blas/base/zrotg' );

var out;
var i;

function rand() {
    return new Complex128( discreteUniform( -5, 5 ), discreteUniform( -5, 5 ) );
}

for ( i = 0; i < 100; i++ ) {
    out = zrotg( rand(), rand() );
    console.log( out );
}

C APIs

Usage

TODO

TODO

TODO.

TODO

TODO

TODO

Examples

TODO