NAG FL Interface
f06baf (drotgc)

1 Purpose

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

2 Specification

Fortran Interface
Subroutine f06baf ( a, b, c, s)
Real (Kind=nag_wp), Intent (Inout) :: a, b
Real (Kind=nag_wp), Intent (Out) :: c, s
C Header Interface
#include <nag.h>
void  f06baf_ (double *a, double *b, double *c, double *s)
The routine may be called by the names f06baf or nagf_blas_drotgc.

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; to apply it to a pair of complex vectors, call f06kpf.

4 References

None.

5 Arguments

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 Parallelism and Performance

f06baf is not threaded in any implementation.

9 Further Comments

None.

10 Example

None.