NAG FL Interface
f06fqf (dsrotg)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

f06fqf generates a sequence of real plane rotations.

2 Specification

Fortran Interface
Subroutine f06fqf ( pivot, direct, n, alpha, x, incx, c, s)
Integer, Intent (In) :: n, incx
Real (Kind=nag_wp), Intent (Inout) :: alpha, x(*)
Real (Kind=nag_wp), Intent (Out) :: c(n), s(n)
Character (1), Intent (In) :: pivot, direct
C Header Interface
#include <nag.h>
void  f06fqf_ (const char *pivot, const char *direct, const Integer *n, double *alpha, double x[], const Integer *incx, double c[], double s[], const Charlen length_pivot, const Charlen length_direct)
The routine may be called by the names f06fqf or nagf_blas_dsrotg.

3 Description

f06fqf generates the parameters of a real orthogonal matrix P, of order n+1, chosen so as to set to zero the elements of a supplied n-element real vector x.
If pivot='F' and direct='F', or if pivot='V' and direct='B',
P ( α x )=( β 0 );  
If pivot='F' and direct='B', or if pivot='V' and direct='F',
P ( x α )=( 0 β ) .  
Here α and β are real scalars.
P is represented as a sequence of n plane rotations Pk, as specified by pivot and direct; Pk is chosen to annihilate xk, and its 2×2 plane rotation part has the form
( ck sk -sk ck ) .  
The tangent of the rotation, tk, is overwritten on xk.

4 References

None.

5 Arguments

1: pivot Character(1) Input
On entry: specifies the plane rotated by Pk.
pivot='V' (variable pivot)
Pk rotates the (k,k+1) plane.
pivot='F' (fixed pivot)
Pk rotates the (1,k+1) plane if direct='F', or the (k,n+1) plane if direct='B'.
Constraint: pivot='V' or 'F'.
2: direct Character(1) Input
On entry: specifies the sequence direction.
direct='F' (forward sequence)
P=PnP2P1.
direct='B' (backward sequence)
P=P1P2Pn.
Constraint: direct='F' or 'B'.
3: n Integer Input
On entry: n, the number of elements in x.
4: alpha Real (Kind=nag_wp) Input/Output
On entry: the scalar α.
On exit: the scalar β.
5: x(*) Real (Kind=nag_wp) array Input/Output
Note: the dimension of the array x must be at least max(1, 1+(n-1) ×incx ) .
On entry: the n-element vector x. xi must be stored in x(1+(i-1)×incx), for i=1,2,,n.
Intermediate elements of x are not referenced.
On exit: the referenced elements are overwritten by details of the sequence of plane rotations.
6: incx Integer Input
On entry: the increment in the subscripts of x between successive elements of x.
Constraint: incx>0.
7: c(n) Real (Kind=nag_wp) array Output
On exit: the values ck, the cosines of the rotations.
8: s(n) Real (Kind=nag_wp) array Output
On exit: the values sk, the sines of the rotations.

6 Error Indicators and Warnings

None.

7 Accuracy

Not applicable.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
f06fqf is not threaded in any implementation.

9 Further Comments

None.

10 Example

None.