# dlag2s

Converts a double precision matrix to a single precision matrix.

## Syntax

call dlag2s( m, n, a, lda, sa, ldsa, info )

## Description

The routine converts a double precision matrix SA to a single precision matrix A.

RMAX is the overflow for the single precision arithmetic. dlag2s checks that all the entries of A are between -RMAX and RMAX. If not, the convertion is aborted and a flag is raised.

This is a helper routine so there is no argument checking.

## Input Parameters

m

  INTEGER. The number of lines of the matrix A (`m ≥ 0`).

n

  INTEGER. The number of columns in the matrix A (`n ≥ 0`).

a

  DOUBLE PRECISION array, DIMENSION (lda, n).

  On entry, contains the m-by-n coefficient matrix A.

lda

  INTEGER. The leading dimension of the array a; lda ≥ max(1, m).

ldsa

  INTEGER. The leading dimension of the array sa; ldsa ≥ max(1, m).

## Output Parameters

sa

  REAL array, DIMENSION (ldsa, n).

  On exit, if info = 0, contains the m-by-n coefficient matrix SA.

info

  INTEGER.

  If `info = 0`, the execution is successful.

  If `info = k`, the (i, j) entry of the matrix A has overflowed when moving from double precision to single precision. k is given by `k = (i-1)*lda+j`.

Parent topic: Auxiliary Routines