# ?rotg

Computes the parameters for a Givens rotation.

## Syntax

FORTRAN 77:

call srotg(a, b, c, s )

call drotg(a, b, c, s )

call crotg(a, b, c, s )

call zrotg(a, b, c, s )

Fortran 95:

call rotg(a, b, c, s)

## Description

Given the cartesian coordinates `(a, b)` of a point `p`, these routines return the parameters a, b, c, and s associated with the Givens rotation that zeros the y-coordinate of the point.

See a more accurate LAPACK version ?lartg.

## Input Parameters

a

  REAL for srotg

  DOUBLE PRECISION for drotg

  COMPLEX for crotg

  DOUBLE COMPLEX for zrotg

  Provides the x-coordinate of the point `p`.

b

  REAL for srotg

  DOUBLE PRECISION for drotg

  COMPLEX for crotg

  DOUBLE COMPLEX for zrotg

  Provides the y-coordinate of the point `p`.

## Output Parameters

a

  Contains the parameter r associated with the Givens rotation.

b

  Contains the parameter z associated with the Givens rotation.

c

  REAL for srotg

  DOUBLE PRECISION for drotg

  REAL for crotg

  DOUBLE PRECISION for zrotg

  Contains the parameter c associated with the Givens rotation.

s

  REAL for srotg

  DOUBLE PRECISION for drotg

  COMPLEX for crotg

  DOUBLE COMPLEX for zrotg

  Contains the parameter s associated with the Givens rotation.

Parent topic: BLAS Level 1 Routines