# NAG Library Routine Document

## 1Purpose

f06bef generates a real Jacobi plane rotation.

## 2Specification

Fortran Interface
 Subroutine f06bef ( job, x, y, z, c, s)
 Real (Kind=nag_wp), Intent (Inout) :: x, y, z Real (Kind=nag_wp), Intent (Out) :: c, s Character (1), Intent (In) :: job
C Header Interface
#include nagmk26.h
 void f06bef_ ( const char *job, double *x, double *y, double *z, double *c, double *s, const Charlen length_job)

## 3Description

f06bef generates a real Jacobi plane rotation with parameters $c$ and $s$, which diagonalizes a given $2$ by $2$ real symmetric matrix:
 $c s -s c x y y z c -s s c = a 0 0 b .$
None.

## 5Arguments

1:     $\mathbf{job}$ – Character(1)Input
On entry: specifies the property which determines the precise form of the rotation.
${\mathbf{job}}=\text{'B'}$
$c\ge 1/\sqrt{2}$.
${\mathbf{job}}=\text{'S'}$
$0\le c\le 1/\sqrt{2}$.
${\mathbf{job}}=\text{'M'}$
$\left|a\right|\ge \left|b\right|$.
Constraint: ${\mathbf{job}}=\text{'B'}$, $\text{'S'}$ or $\text{'M'}$.
2:     $\mathbf{x}$ – Real (Kind=nag_wp)Input/Output
On entry: the value $x$, the $\left(1,1\right)$ element of the input matrix.
On exit: the value $a$.
3:     $\mathbf{y}$ – Real (Kind=nag_wp)Input/Output
On entry: the value $y$, the $\left(1,2\right)$ or $\left(2,1\right)$ element of the input matrix.
On exit: the value $t$, the tangent of the rotation.
4:     $\mathbf{z}$ – Real (Kind=nag_wp)Input/Output
On entry: the value $z$. the $\left(2,2\right)$ element of the input matrix.
On exit: the value $b$.
5:     $\mathbf{c}$ – Real (Kind=nag_wp)Output
On exit: the value $c$, the cosine of the rotation.
6:     $\mathbf{s}$ – Real (Kind=nag_wp)Output
On exit: the value $s$, the sine of the rotation.

None.

Not applicable.

## 8Parallelism and Performance

f06bef is not threaded in any implementation.

None.

## 10Example

None.
© The Numerical Algorithms Group Ltd, Oxford, UK. 2017