You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

sget06.f 2.4 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. *> \brief \b SGET06
  2. *
  3. * =========== DOCUMENTATION ===========
  4. *
  5. * Online html documentation available at
  6. * http://www.netlib.org/lapack/explore-html/
  7. *
  8. * Definition:
  9. * ===========
  10. *
  11. * REAL FUNCTION SGET06( RCOND, RCONDC )
  12. *
  13. * .. Scalar Arguments ..
  14. * REAL RCOND, RCONDC
  15. * ..
  16. *
  17. *
  18. *> \par Purpose:
  19. * =============
  20. *>
  21. *> \verbatim
  22. *>
  23. *> SGET06 computes a test ratio to compare two values for RCOND.
  24. *> \endverbatim
  25. *
  26. * Arguments:
  27. * ==========
  28. *
  29. *> \param[in] RCOND
  30. *> \verbatim
  31. *> RCOND is REAL
  32. *> The estimate of the reciprocal of the condition number of A,
  33. *> as computed by SGECON.
  34. *> \endverbatim
  35. *>
  36. *> \param[in] RCONDC
  37. *> \verbatim
  38. *> RCONDC is REAL
  39. *> The reciprocal of the condition number of A, computed as
  40. *> ( 1/norm(A) ) / norm(inv(A)).
  41. *> \endverbatim
  42. *
  43. * Authors:
  44. * ========
  45. *
  46. *> \author Univ. of Tennessee
  47. *> \author Univ. of California Berkeley
  48. *> \author Univ. of Colorado Denver
  49. *> \author NAG Ltd.
  50. *
  51. *> \ingroup single_lin
  52. *
  53. * =====================================================================
  54. REAL FUNCTION SGET06( RCOND, RCONDC )
  55. *
  56. * -- LAPACK test routine --
  57. * -- LAPACK is a software package provided by Univ. of Tennessee, --
  58. * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
  59. *
  60. * .. Scalar Arguments ..
  61. REAL RCOND, RCONDC
  62. * ..
  63. *
  64. * =====================================================================
  65. *
  66. * .. Parameters ..
  67. REAL ZERO, ONE
  68. PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 )
  69. * ..
  70. * .. Local Scalars ..
  71. REAL EPS, RAT
  72. * ..
  73. * .. External Functions ..
  74. REAL SLAMCH
  75. EXTERNAL SLAMCH
  76. * ..
  77. * .. Intrinsic Functions ..
  78. INTRINSIC MAX, MIN
  79. * ..
  80. * .. Executable Statements ..
  81. *
  82. EPS = SLAMCH( 'Epsilon' )
  83. IF( RCOND.GT.ZERO ) THEN
  84. IF( RCONDC.GT.ZERO ) THEN
  85. RAT = MAX( RCOND, RCONDC ) / MIN( RCOND, RCONDC ) -
  86. $ ( ONE-EPS )
  87. ELSE
  88. RAT = RCOND / EPS
  89. END IF
  90. ELSE
  91. IF( RCONDC.GT.ZERO ) THEN
  92. RAT = RCONDC / EPS
  93. ELSE
  94. RAT = ZERO
  95. END IF
  96. END IF
  97. SGET06 = RAT
  98. RETURN
  99. *
  100. * End of SGET06
  101. *
  102. END