naginterfaces.library.blas.drotgc

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

drotgc generates a real Givens plane rotation and the tangent of that rotation.

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

https://www.nag.com/numeric/nl/nagdoc_28.7/flhtml/f06/f06baf.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 , the tangent of the rotation.

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.

drotgc generates a real Givens plane rotation with parameters () and , such that, given real and :

On exit, is overwritten by , the tangent of the rotation; and can be reconstructed from the single stored value , by a subsequent call to dcsg().

If , where is the machine precision, the function sets and ; if , the function sets and .

Note that is always set to , unless this would overflow, in which case the value is returned, where is the value given by .

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