# NAG FL Interfacef06cbf (zrotgs)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

f06cbf generates a complex Givens plane rotation having real sine.

## 2Specification

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

## 3Description

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 $|b|<\epsilon |a|$ and $\mathrm{Im}\left(a\right)=0$, where $\epsilon$ is the machine precision, the routine sets $c=1$ and $s=|t|$.
If $|b|<\epsilon |a|$ and $\mathrm{Im}\left(a\right)\ne 0$, the routine sets
 $c=sign(Re(a))a |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 complex expression
 $( flmax × sign(Re(b)/a) , flmax × sign(Im(b)/a) ) ;$
$\mathit{flmax}$ is the real value given by $1/\left({\mathbf{x02amf}}\right)$.
None.

## 5Arguments

1: $\mathbf{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: $\mathbf{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: $\mathbf{c}$Complex (Kind=nag_wp) Output
On exit: the value $c$, the cosine of the rotation.
4: $\mathbf{s}$Real (Kind=nag_wp) Output
On exit: the value $s$, the sine of the rotation.

None.

Not applicable.