Package Exports
- @stdlib/blas-base-drotg
- @stdlib/blas-base-drotg/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stdlib/blas-base-drotg) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
drotg
Construct a Givens plane rotation.
Installation
npm install @stdlib/blas-base-drotg
Usage
var drotg = require( '@stdlib/blas-base-drotg' );
drotg( a, b )
Constructs a Givens plane rotation provided two double-precision floating-point values a
and b
.
var out = drotg( 0.0, 2.0 );
// returns <Float64Array>[ 2.0, 1.0, 0.0, 1.0 ]
The function has the following parameters:
- a: rotational elimination parameter.
- b: rotational elimination parameter.
drotg.assign( a, b, out, stride, offset )
Constructs a Givens plane rotation provided two double-precision floating-point values a
and b
and assigns results to an output array.
var Float64Array = require( '@stdlib/array-float64' );
var out = new Float64Array( 4 );
var y = drotg.assign( 0.0, 2.0, out, 1, 0 );
// returns <Float64Array>[ 2.0, 1.0, 0.0, 1.0 ]
var bool = ( y === out );
// returns true
Notes
var discreteUniform = require( '@stdlib/random-base-discrete-uniform' );
var drotg = require( '@stdlib/blas-base-drotg' );
var out;
var i;
for ( i = 0; i < 100; i++ ) {
out = drotg( discreteUniform( -5, 5 ), discreteUniform( -5, 5 ) );
console.log( out );
}
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-2023. The Stdlib Authors.