naginterfaces.library.blas.drotg

naginterfaces.library.blas.drotg(a, b)[source]

drotg generates a real Givens plane rotation.

For full information please refer to the NAG Library document for f06aa

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f06/f06aaf.html

Parameters
afloat

The value , the first element of the vector which determines the rotation.

bfloat

The value , the second element of the vector which determines the rotation.

Returns
afloat

The value .

bfloat

The value , from which and can be reconstructed.

cfloat

The value , the cosine of the rotation.

sfloat

The value , the sine of the rotation.

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

drotg generates a real Givens plane rotation with parameters and , such that, given real and :

The function computes , and as follows:

The function also computes the value defined as

This enables and to be reconstructed from the single value as

To apply the plane rotation to a pair of real vectors, call drot(); to apply it to a pair of complex vectors, call zdrot().