# ?rotmg

Computes parameters for a modified Givens rotation.

## Syntax

FORTRAN 77:

call srotmg(d1, d2, x1, y1, param)

call drotmg(d1, d2, x1, y1, param)

Fortran 95:

call rotmg(x1, y1, param [, d1] [d2])

## Description

Given cartesian coordinates (x1, y1) of an input vector, these routines compute the components of a modified Givens transformation matrix H that zeros the y-component of the resulting vector:

## Input Parameters

d1

  REAL for srotmg

  DOUBLE PRECISION for drotmg

  Provides the scaling factor for the x-coordinate of the input vector.

d2

  REAL for srotmg

  DOUBLE PRECISION for drotmg

  Provides the scaling factor for the y-coordinate of the input vector.

x1

  REAL for srotmg

  DOUBLE PRECISION for drotmg

  Provides the x-coordinate of the input vector.

y1

  REAL for srotmg

  DOUBLE PRECISION for drotmg

  Provides the y-coordinate of the input vector.

## Output Parameters

d1

  REAL for srotmg

  DOUBLE PRECISION for drotmg

  Provides the first diagonal element of the updated matrix.

d2

  REAL for srotmg

  DOUBLE PRECISION for drotmg

  Provides the second diagonal element of the updated matrix.

x1

  REAL for srotmg

  DOUBLE PRECISION for drotmg

  Provides the x-coordinate of the rotated vector before scaling.

param

  REAL for srotmg

  DOUBLE PRECISION for drotmg

  Array, DIMENSION 5.

  The elements of the param array are:

  param(1) contains a switch, flag. param(2-5) contain h11, h21, h12, and h22, respectively, the components of the array H.

  Depending on the values of flag, the components of H are set as follows:

  In the last three cases, the matrix entries of 1., -1., and 0. are assumed based on the value of flag and are not required to be set in the param vector.

## Fortran 95 Interface Notes

Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see Fortran 95 Interface Conventions.

Specific details for the routine rotmg interface are the following:

d1

  The default value is 1.

d2

  The default value is 1.

Parent topic: BLAS Level 1 Routines