# ?lasq1

Computes the singular values of a real square bidiagonal matrix. Used by ?bdsqr.

## Syntax

call slasq1( n, d, e, work, info )

call dlasq1( n, d, e, work, info )

## Description

The routine ?lasq1 computes the singular values of a real n-by-n bidiagonal matrix with diagonal d and off-diagonal e. The singular values are computed to high relative accuracy, in the absence of denormalization, underflow and overflow.

## Input Parameters

n

  INTEGER.The number of rows and columns in the matrix. `n ≥ 0`.

d

  REAL for slasq1

  DOUBLE PRECISION for dlasq1.

  Array, DIMENSION (n).

  On entry, d contains the diagonal elements of the bidiagonal matrix whose SVD is desired.

e

  REAL for slasq1

  DOUBLE PRECISION for dlasq1.

  Array, DIMENSION (n).

  On entry, elements `e(1:n-1)` contain the off-diagonal elements of the bidiagonal matrix whose SVD is desired.

work

  REAL for slasq1

  DOUBLE PRECISION for dlasq1.

  Workspace array, DIMENSION `(4n)`.

## Output Parameters

d

  On normal exit, d contains the singular values in decreasing order.

e

  On exit, e is overwritten.

info

  INTEGER.

  = 0: successful exit;

  < 0: if `info = -i`, the i-th argument had an illegal value;

  > 0: the algorithm failed:

  = 1, a split was marked by a positive value in e;

  = 2, current block of z not diagonalized after 30n iterations (in inner while loop);

  = 3, termination criterion of outer while loop not met (program created more than n unreduced blocks.

Parent topic: Auxiliary Routines