--- 
:name: dlartgs
:md5sum: bf0292e885c671bdbb8046966e02a27e
:category: :subroutine
:arguments: 
- x: 
    :type: doublereal
    :intent: input
- y: 
    :type: doublereal
    :intent: input
- sigma: 
    :type: doublereal
    :intent: input
- cs: 
    :type: doublereal
    :intent: output
- sn: 
    :type: doublereal
    :intent: output
:substitutions: {}

:fortran_help: "      SUBROUTINE DLARTGS( X, Y, SIGMA, CS, SN )\n\n\
  *  Purpose\n\
  *  =======\n\
  *\n\
  *  DLARTGS generates a plane rotation designed to introduce a bulge in\n\
  *  Golub-Reinsch-style implicit QR iteration for the bidiagonal SVD\n\
  *  problem. X and Y are the top-row entries, and SIGMA is the shift.\n\
  *  The computed CS and SN define a plane rotation satisfying\n\
  *\n\
  *     [  CS  SN  ]  .  [ X^2 - SIGMA ]  =  [ R ],\n\
  *     [ -SN  CS  ]     [    X * Y    ]     [ 0 ]\n\
  *\n\
  *  with R nonnegative.  If X^2 - SIGMA and X * Y are 0, then the\n\
  *  rotation is by PI/2.\n\
  *\n\n\
  *  Arguments\n\
  *  =========\n\
  *\n\
  *  X       (input) DOUBLE PRECISION\n\
  *          The (1,1) entry of an upper bidiagonal matrix.\n\
  *\n\
  *  Y       (input) DOUBLE PRECISION\n\
  *          The (1,2) entry of an upper bidiagonal matrix.\n\
  *\n\
  *  SIGMA   (input) DOUBLE PRECISION\n\
  *          The shift.\n\
  *\n\
  *  CS      (output) DOUBLE PRECISION\n\
  *          The cosine of the rotation.\n\
  *\n\
  *  SN      (output) DOUBLE PRECISION\n\
  *          The sine of the rotation.\n\
  *\n\n\
  *  ===================================================================\n\
  *\n"
