# NAG FL Interfacef06baf (drotgc)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

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

## 2Specification

Fortran Interface
 Subroutine f06baf ( a, b, c, s)
 Real (Kind=nag_wp), Intent (Inout) :: a, b Real (Kind=nag_wp), Intent (Out) :: c, s
#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.

## 3Description

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 $|b|<\sqrt{\epsilon }|a|$, where $\epsilon$ is the machine precision, the routine sets $c=1$ and $s=0$; if $|a|<\sqrt{\epsilon }|b|$, 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; to apply it to a pair of complex vectors, call f06kpf.

None.

## 5Arguments

1: $\mathbf{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: $\mathbf{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: $\mathbf{c}$Real (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.

## 8Parallelism and Performance

f06baf is not threaded in any implementation.