F06 Chapter Contents
F06 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF06BAF

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

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$ ($\text{}\ge 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 $\left|b\right|<\sqrt{\epsilon }\left|a\right|$, where $\epsilon$ is the machine precision, the routine sets $c=1$ and $s=0$; if $\left|a\right|<\sqrt{\epsilon }\left|b\right|$, the routine sets $c=0$ and $s=\mathrm{sign}b/a$.
Note that $t$ is always set to $b/a$, unless this would overflow, in which case the value $\mathit{flmax}×\mathrm{sign}b/a$ is returned, where $\mathit{flmax}$ is the value given by $1/\left({\mathbf{X02AMF}}\right)$.
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.

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.

None.

Not applicable.