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.

dlabad.f 3.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. *> \brief \b DLABAD
  2. *
  3. * =========== DOCUMENTATION ===========
  4. *
  5. * Online html documentation available at
  6. * http://www.netlib.org/lapack/explore-html/
  7. *
  8. *> \htmlonly
  9. *> Download DLABAD + dependencies
  10. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlabad.f">
  11. *> [TGZ]</a>
  12. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlabad.f">
  13. *> [ZIP]</a>
  14. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlabad.f">
  15. *> [TXT]</a>
  16. *> \endhtmlonly
  17. *
  18. * Definition:
  19. * ===========
  20. *
  21. * SUBROUTINE DLABAD( SMALL, LARGE )
  22. *
  23. * .. Scalar Arguments ..
  24. * DOUBLE PRECISION LARGE, SMALL
  25. * ..
  26. *
  27. *
  28. *> \par Purpose:
  29. * =============
  30. *>
  31. *> \verbatim
  32. *>
  33. *> DLABAD takes as input the values computed by DLAMCH for underflow and
  34. *> overflow, and returns the square root of each of these values if the
  35. *> log of LARGE is sufficiently large. This subroutine is intended to
  36. *> identify machines with a large exponent range, such as the Crays, and
  37. *> redefine the underflow and overflow limits to be the square roots of
  38. *> the values computed by DLAMCH. This subroutine is needed because
  39. *> DLAMCH does not compensate for poor arithmetic in the upper half of
  40. *> the exponent range, as is found on a Cray.
  41. *> \endverbatim
  42. *
  43. * Arguments:
  44. * ==========
  45. *
  46. *> \param[in,out] SMALL
  47. *> \verbatim
  48. *> SMALL is DOUBLE PRECISION
  49. *> On entry, the underflow threshold as computed by DLAMCH.
  50. *> On exit, if LOG10(LARGE) is sufficiently large, the square
  51. *> root of SMALL, otherwise unchanged.
  52. *> \endverbatim
  53. *>
  54. *> \param[in,out] LARGE
  55. *> \verbatim
  56. *> LARGE is DOUBLE PRECISION
  57. *> On entry, the overflow threshold as computed by DLAMCH.
  58. *> On exit, if LOG10(LARGE) is sufficiently large, the square
  59. *> root of LARGE, otherwise unchanged.
  60. *> \endverbatim
  61. *
  62. * Authors:
  63. * ========
  64. *
  65. *> \author Univ. of Tennessee
  66. *> \author Univ. of California Berkeley
  67. *> \author Univ. of Colorado Denver
  68. *> \author NAG Ltd.
  69. *
  70. *> \ingroup OTHERauxiliary
  71. *
  72. * =====================================================================
  73. SUBROUTINE DLABAD( SMALL, LARGE )
  74. *
  75. * -- LAPACK auxiliary routine --
  76. * -- LAPACK is a software package provided by Univ. of Tennessee, --
  77. * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
  78. *
  79. * .. Scalar Arguments ..
  80. DOUBLE PRECISION LARGE, SMALL
  81. * ..
  82. *
  83. * =====================================================================
  84. *
  85. * .. Intrinsic Functions ..
  86. INTRINSIC LOG10, SQRT
  87. * ..
  88. * .. Executable Statements ..
  89. *
  90. * If it looks like we're on a Cray, take the square root of
  91. * SMALL and LARGE to avoid overflow and underflow problems.
  92. *
  93. IF( LOG10( LARGE ).GT.2000.D0 ) THEN
  94. SMALL = SQRT( SMALL )
  95. LARGE = SQRT( LARGE )
  96. END IF
  97. *
  98. RETURN
  99. *
  100. * End of DLABAD
  101. *
  102. END