F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

NAG Library Routine DocumentF06CBF

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.

1  Purpose

F06CBF generates a complex Givens plane rotation having real sine.

2  Specification

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

3  Description

F06CBF generates a complex Givens plane rotation with parameters $c$ (complex) and $s$ (real), such that, given complex $a$ and $b$:
 $c- s -s c a b = d 0 ,$
If $b$ 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 F06CDF.
If $\left|b\right|<\epsilon \left|a\right|$ and $\mathrm{Im}\left(a\right)=0$, where $\epsilon$ is the machine precision, the routine sets $c=1$ and $s=\left|t\right|$.
If $\left|b\right|<\epsilon \left|a\right|$ and $\mathrm{Im}\left(a\right)\ne 0$, the routine sets
 $c=signReaa a 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 ;$
$\mathit{flmax}$ is the real value given by $1/\left({\mathbf{X02AMF}}\right)$.

None.

5  Parameters

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 – COMPLEX (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.

None.

Not applicable.