--- 
:name: slasd8
:md5sum: 0427daa3f0dc3190e3b4094e1d06ca65
:category: :subroutine
:arguments: 
- icompq: 
    :type: integer
    :intent: input
- k: 
    :type: integer
    :intent: input
- d: 
    :type: real
    :intent: output
    :dims: 
    - k
- z: 
    :type: real
    :intent: input/output
    :dims: 
    - k
- vf: 
    :type: real
    :intent: input/output
    :dims: 
    - k
- vl: 
    :type: real
    :intent: input/output
    :dims: 
    - k
- difl: 
    :type: real
    :intent: output
    :dims: 
    - k
- difr: 
    :type: real
    :intent: output
    :dims: 
    - "icompq == 1 ? lddifr : icompq == 0 ? k : 0"
    - "icompq == 1 ? 2 : 0"
- lddifr: 
    :type: integer
    :intent: input
- dsigma: 
    :type: real
    :intent: input/output
    :dims: 
    - k
- work: 
    :type: real
    :intent: workspace
    :dims: 
    - 3 * k
- info: 
    :type: integer
    :intent: output
:substitutions: 
  lddifr: k
:fortran_help: "      SUBROUTINE SLASD8( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDDIFR, DSIGMA, WORK, INFO )\n\n\
  *  Purpose\n\
  *  =======\n\
  *\n\
  *  SLASD8 finds the square roots of the roots of the secular equation,\n\
  *  as defined by the values in DSIGMA and Z. It makes the appropriate\n\
  *  calls to SLASD4, and stores, for each  element in D, the distance\n\
  *  to its two nearest poles (elements in DSIGMA). It also updates\n\
  *  the arrays VF and VL, the first and last components of all the\n\
  *  right singular vectors of the original bidiagonal matrix.\n\
  *\n\
  *  SLASD8 is called from SLASD6.\n\
  *\n\n\
  *  Arguments\n\
  *  =========\n\
  *\n\
  *  ICOMPQ  (input) INTEGER\n\
  *          Specifies whether singular vectors are to be computed in\n\
  *          factored form in the calling routine:\n\
  *          = 0: Compute singular values only.\n\
  *          = 1: Compute singular vectors in factored form as well.\n\
  *\n\
  *  K       (input) INTEGER\n\
  *          The number of terms in the rational function to be solved\n\
  *          by SLASD4.  K >= 1.\n\
  *\n\
  *  D       (output) REAL array, dimension ( K )\n\
  *          On output, D contains the updated singular values.\n\
  *\n\
  *  Z       (input/output) REAL array, dimension ( K )\n\
  *          On entry, the first K elements of this array contain the\n\
  *          components of the deflation-adjusted updating row vector.\n\
  *          On exit, Z is updated.\n\
  *\n\
  *  VF      (input/output) REAL array, dimension ( K )\n\
  *          On entry, VF contains  information passed through DBEDE8.\n\
  *          On exit, VF contains the first K components of the first\n\
  *          components of all right singular vectors of the bidiagonal\n\
  *          matrix.\n\
  *\n\
  *  VL      (input/output) REAL array, dimension ( K )\n\
  *          On entry, VL contains  information passed through DBEDE8.\n\
  *          On exit, VL contains the first K components of the last\n\
  *          components of all right singular vectors of the bidiagonal\n\
  *          matrix.\n\
  *\n\
  *  DIFL    (output) REAL array, dimension ( K )\n\
  *          On exit, DIFL(I) = D(I) - DSIGMA(I).\n\
  *\n\
  *  DIFR    (output) REAL array,\n\
  *                   dimension ( LDDIFR, 2 ) if ICOMPQ = 1 and\n\
  *                   dimension ( K ) if ICOMPQ = 0.\n\
  *          On exit, DIFR(I,1) = D(I) - DSIGMA(I+1), DIFR(K,1) is not\n\
  *          defined and will not be referenced.\n\
  *\n\
  *          If ICOMPQ = 1, DIFR(1:K,2) is an array containing the\n\
  *          normalizing factors for the right singular vector matrix.\n\
  *\n\
  *  LDDIFR  (input) INTEGER\n\
  *          The leading dimension of DIFR, must be at least K.\n\
  *\n\
  *  DSIGMA  (input/output) REAL array, dimension ( K )\n\
  *          On entry, the first K elements of this array contain the old\n\
  *          roots of the deflated updating problem.  These are the poles\n\
  *          of the secular equation.\n\
  *          On exit, the elements of DSIGMA may be very slightly altered\n\
  *          in value.\n\
  *\n\
  *  WORK    (workspace) REAL array, dimension at least 3 * K\n\
  *\n\
  *  INFO    (output) INTEGER\n\
  *          = 0:  successful exit.\n\
  *          < 0:  if INFO = -i, the i-th argument had an illegal value.\n\
  *          > 0:  if INFO = 1, a singular value did not converge\n\
  *\n\n\
  *  Further Details\n\
  *  ===============\n\
  *\n\
  *  Based on contributions by\n\
  *     Ming Gu and Huan Ren, Computer Science Division, University of\n\
  *     California at Berkeley, USA\n\
  *\n\
  *  =====================================================================\n\
  *\n"
