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.

cla_wwaddw.f 2.8 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. *> \brief \b CLA_WWADDW adds a vector into a doubled-single vector.
  2. *
  3. * =========== DOCUMENTATION ===========
  4. *
  5. * Online html documentation available at
  6. * http://www.netlib.org/lapack/explore-html/
  7. *
  8. *> \htmlonly
  9. *> Download CLA_WWADDW + dependencies
  10. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/cla_wwaddw.f">
  11. *> [TGZ]</a>
  12. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/cla_wwaddw.f">
  13. *> [ZIP]</a>
  14. *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/cla_wwaddw.f">
  15. *> [TXT]</a>
  16. *> \endhtmlonly
  17. *
  18. * Definition:
  19. * ===========
  20. *
  21. * SUBROUTINE CLA_WWADDW( N, X, Y, W )
  22. *
  23. * .. Scalar Arguments ..
  24. * INTEGER N
  25. * ..
  26. * .. Array Arguments ..
  27. * COMPLEX X( * ), Y( * ), W( * )
  28. * ..
  29. *
  30. *
  31. *> \par Purpose:
  32. * =============
  33. *>
  34. *> \verbatim
  35. *>
  36. *> CLA_WWADDW adds a vector W into a doubled-single vector (X, Y).
  37. *>
  38. *> This works for all extant IBM's hex and binary floating point
  39. *> arithmetic, but not for decimal.
  40. *> \endverbatim
  41. *
  42. * Arguments:
  43. * ==========
  44. *
  45. *> \param[in] N
  46. *> \verbatim
  47. *> N is INTEGER
  48. *> The length of vectors X, Y, and W.
  49. *> \endverbatim
  50. *>
  51. *> \param[in,out] X
  52. *> \verbatim
  53. *> X is COMPLEX array, dimension (N)
  54. *> The first part of the doubled-single accumulation vector.
  55. *> \endverbatim
  56. *>
  57. *> \param[in,out] Y
  58. *> \verbatim
  59. *> Y is COMPLEX array, dimension (N)
  60. *> The second part of the doubled-single accumulation vector.
  61. *> \endverbatim
  62. *>
  63. *> \param[in] W
  64. *> \verbatim
  65. *> W is COMPLEX array, dimension (N)
  66. *> The vector to be added.
  67. *> \endverbatim
  68. *
  69. * Authors:
  70. * ========
  71. *
  72. *> \author Univ. of Tennessee
  73. *> \author Univ. of California Berkeley
  74. *> \author Univ. of Colorado Denver
  75. *> \author NAG Ltd.
  76. *
  77. *> \ingroup complexOTHERcomputational
  78. *
  79. * =====================================================================
  80. SUBROUTINE CLA_WWADDW( N, X, Y, W )
  81. *
  82. * -- LAPACK computational routine --
  83. * -- LAPACK is a software package provided by Univ. of Tennessee, --
  84. * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
  85. *
  86. * .. Scalar Arguments ..
  87. INTEGER N
  88. * ..
  89. * .. Array Arguments ..
  90. COMPLEX X( * ), Y( * ), W( * )
  91. * ..
  92. *
  93. * =====================================================================
  94. *
  95. * .. Local Scalars ..
  96. COMPLEX S
  97. INTEGER I
  98. * ..
  99. * .. Executable Statements ..
  100. *
  101. DO 10 I = 1, N
  102. S = X(I) + W(I)
  103. S = (S + S) - S
  104. Y(I) = ((X(I) - S) + W(I)) + Y(I)
  105. X(I) = S
  106. 10 CONTINUE
  107. RETURN
  108. *
  109. * End of CLA_WWADDW
  110. *
  111. END