F06BAF (PDF version)
F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F06BAF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

+ Contents

    1  Purpose
    7  Accuracy
    9  Example

1  Purpose

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

2  Specification

SUBROUTINE F06BAF ( A, B, C, S)
REAL (KIND=nag_wp)  A, B, C, S

3  Description

F06BAF generates a real Givens plane rotation with parameters c (0) and s, such that, given real a and b:
c s -s c a b = d 0 .
On exit, b is overwritten by t, the tangent of the rotation; c and s can be reconstructed from the single stored value t, by a subsequent call to F06BCF.
If b<εa, where ε is the machine precision, the routine sets c=1 and s=0; if a<εb, the routine sets c=0 and s=signb/a.
Note that t is always set to b/a, unless this would overflow, in which case the value flmax×signb/a is returned, where flmax is the value given by 1/X02AMF.
To apply the plane rotation to a pair of real vectors, call F06EPF (DROT); to apply it to a pair of complex vectors, call F06KPF.

4  References

None.

5  Parameters

1:     A – REAL (KIND=nag_wp)Input/Output
On entry: the value a, the first element of the vector which determines the rotation.
On exit: the value d.
2:     B – REAL (KIND=nag_wp)Input/Output
On entry: the value b, the second element of the vector which determines the rotation.
On exit: the value t, the tangent of the rotation.
3:     C – REAL (KIND=nag_wp)Output
On exit: the value c, the cosine of the rotation.
4:     S – REAL (KIND=nag_wp)Output
On exit: the value s, the sine of the rotation.

6  Error Indicators and Warnings

None.

7  Accuracy

Not applicable.

8  Further Comments

None.

9  Example

None.

F06BAF (PDF version)
F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012