NAG FL Interface
f06caf (zrotgc)

1 Purpose

f06caf generates a complex Givens plane rotation having real cosine.

2 Specification

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

3 Description

f06caf generates a complex Givens plane rotation with parameters c (real 0) and s (complex), such that, given complex a and b:
c s¯ -s c a b = d 0 .  
If a is real, then d is also real. 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 f06ccf.
If b<εa, where ε is the machine precision, the routine sets c=1 and s=t.
Note that t is always set to b/a, unless overflow would occur, in which case the routine returns the value of the expression
CMPLX flmax × sign Reb /a , flmax × signImb / a ;  
flmax is the real value given by 1/x02amf.

4 References

None.

5 Arguments

1: a Complex (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 Complex (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 Complex (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

f06caf is not threaded in any implementation.

9 Further Comments

None.

10 Example

None.