Télécharger dlapy2.eso

Retour à la liste

Numérotation des lignes :

  1. C DLAPY2 SOURCE BP208322 15/10/13 21:15:33 8670
  2. *> \brief \b DLAPY2 returns sqrt(x2+y2).
  3. *
  4. * =========== DOCUMENTATION ===========
  5. *
  6. * Online html documentation available at
  7. * http://www.netlib.org/lapack/explore-html/
  8. *
  9. *> \htmlonly
  10. *> Download DLAPY2 + dependencies
  11. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapy2.f">
  12. *> [TGZ]</a>
  13. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapy2.f">
  14. *> [ZIP]</a>
  15. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapy2.f">
  16. *> [TXT]</a>
  17. *> \endhtmlonly
  18. *
  19. * Definition:
  20. * ===========
  21. *
  22. * REAL*8 FUNCTION DLAPY2( X, Y )
  23. *
  24. * .. Scalar Arguments ..
  25. * REAL*8 X, Y
  26. * ..
  27. *
  28. *
  29. *> \par Purpose:
  30. * =============
  31. *>
  32. *> \verbatim
  33. *>
  34. *> DLAPY2 returns sqrt(x**2+y**2), taking care not to cause unnecessary
  35. *> overflow.
  36. *> \endverbatim
  37. *
  38. * Arguments:
  39. * ==========
  40. *
  41. *> \param[in] X
  42. *> \verbatim
  43. *> X is DOUBLE PRECISION
  44. *> \endverbatim
  45. *>
  46. *> \param[in] Y
  47. *> \verbatim
  48. *> Y is DOUBLE PRECISION
  49. *> X and Y specify the values x and y.
  50. *> \endverbatim
  51. *
  52. * Authors:
  53. * ========
  54. *
  55. *> \author Univ. of Tennessee
  56. *> \author Univ. of California Berkeley
  57. *> \author Univ. of Colorado Denver
  58. *> \author NAG Ltd.
  59. *
  60. *> \date September 2012
  61. *
  62. *> \ingroup auxOTHERauxiliary
  63. *
  64. * =====================================================================
  65. FUNCTION DLAPY2( X, Y )
  66. *
  67. * -- LAPACK auxiliary routine (version 3.4.2) --
  68. * -- LAPACK is a software package provided by Univ. of Tennessee, --
  69. * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
  70. * September 2012
  71. *
  72. * .. Scalar Arguments ..
  73. REAL*8 DLAPY2
  74. REAL*8 X, Y
  75. * ..
  76. *
  77. * =====================================================================
  78. *
  79. * .. Parameters ..
  80. REAL*8 ZERO
  81. PARAMETER ( ZERO = 0.0D0 )
  82. REAL*8 ONE
  83. PARAMETER ( ONE = 1.0D0 )
  84. * ..
  85. * .. Local Scalars ..
  86. REAL*8 W, XABS, YABS, Z
  87. * ..
  88. ** .. Intrinsic Functions ..
  89. * INTRINSIC ABS, MAX, MIN, SQRT
  90. ** ..
  91. ** .. Executable Statements ..
  92. *
  93. XABS = ABS( X )
  94. YABS = ABS( Y )
  95. W = MAX( XABS, YABS )
  96. Z = MIN( XABS, YABS )
  97. IF( Z.EQ.ZERO ) THEN
  98. DLAPY2 = W
  99. ELSE
  100. DLAPY2 = W*SQRT( ONE+( Z / W )**2 )
  101. END IF
  102. RETURN
  103. *
  104. * End of DLAPY2
  105. *
  106. END
  107.  
  108.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales