--- 
:name: dla_lin_berr
:md5sum: 3661649ee822d0355f02d5b222d14624
:category: :subroutine
:arguments: 
- n: 
    :type: integer
    :intent: input
- nz: 
    :type: integer
    :intent: input
- nrhs: 
    :type: integer
    :intent: input
- res: 
    :type: doublereal
    :intent: input
    :dims: 
    - n
    - nrhs
- ayb: 
    :type: doublereal
    :intent: input
    :dims: 
    - n
    - nrhs
- berr: 
    :type: doublereal
    :intent: output
    :dims: 
    - nrhs
:substitutions: {}

:fortran_help: "      SUBROUTINE DLA_LIN_BERR ( N, NZ, NRHS, RES, AYB, BERR )\n\n\
  *  Purpose\n\
  *  =======\n\
  *\n\
  *     DLA_LIN_BERR computes component-wise relative backward error from\n\
  *     the formula\n\
  *         max(i) ( abs(R(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )\n\
  *     where abs(Z) is the component-wise absolute value of the matrix\n\
  *     or vector Z.\n\
  *\n\n\
  *  Arguments\n\
  *  ==========\n\
  *\n\
  *     N       (input) INTEGER\n\
  *     The number of linear equations, i.e., the order of the\n\
  *     matrix A.  N >= 0.\n\
  *\n\
  *     NZ      (input) INTEGER\n\
  *     We add (NZ+1)*SLAMCH( 'Safe minimum' ) to R(i) in the numerator to\n\
  *     guard against spuriously zero residuals. Default value is N.\n\
  *\n\
  *     NRHS    (input) INTEGER\n\
  *     The number of right hand sides, i.e., the number of columns\n\
  *     of the matrices AYB, RES, and BERR.  NRHS >= 0.\n\
  *\n\
  *     RES     (input) DOUBLE PRECISION array, dimension (N,NRHS)\n\
  *     The residual matrix, i.e., the matrix R in the relative backward\n\
  *     error formula above.\n\
  *\n\
  *     AYB     (input) DOUBLE PRECISION array, dimension (N, NRHS)\n\
  *     The denominator in the relative backward error formula above, i.e.,\n\
  *     the matrix abs(op(A_s))*abs(Y) + abs(B_s). The matrices A, Y, and B\n\
  *     are from iterative refinement (see dla_gerfsx_extended.f).\n\
  *     \n\
  *     BERR    (output) DOUBLE PRECISION array, dimension (NRHS)\n\
  *     The component-wise relative backward error from the formula above.\n\
  *\n\n\
  *  =====================================================================\n\
  *\n\
  *     .. Local Scalars ..\n      DOUBLE PRECISION   TMP\n      INTEGER            I, J\n\
  *     ..\n\
  *     .. Intrinsic Functions ..\n      INTRINSIC          ABS, MAX\n\
  *     ..\n\
  *     .. External Functions ..\n      EXTERNAL           DLAMCH\n      DOUBLE PRECISION   DLAMCH\n      DOUBLE PRECISION   SAFE1\n\
  *     ..\n"
