LAPACK  3.4.1
LAPACK: Linear Algebra PACKage
sla_wwaddw.f
Go to the documentation of this file.
00001 *> \brief \b SLA_WWADDW
00002 *
00003 *  =========== DOCUMENTATION ===========
00004 *
00005 * Online html documentation available at 
00006 *            http://www.netlib.org/lapack/explore-html/ 
00007 *
00008 *> \htmlonly
00009 *> Download SLA_WWADDW + dependencies 
00010 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/sla_wwaddw.f"> 
00011 *> [TGZ]</a> 
00012 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/sla_wwaddw.f"> 
00013 *> [ZIP]</a> 
00014 *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/sla_wwaddw.f"> 
00015 *> [TXT]</a>
00016 *> \endhtmlonly 
00017 *
00018 *  Definition:
00019 *  ===========
00020 *
00021 *       SUBROUTINE SLA_WWADDW( N, X, Y, W )
00022 * 
00023 *       .. Scalar Arguments ..
00024 *       INTEGER            N
00025 *       ..
00026 *       .. Array Arguments ..
00027 *       REAL               X( * ), Y( * ), W( * )
00028 *       ..
00029 *  
00030 *
00031 *> \par Purpose:
00032 *  =============
00033 *>
00034 *> \verbatim
00035 *>
00036 *>    SLA_WWADDW adds a vector W into a doubled-single vector (X, Y).
00037 *>
00038 *>    This works for all extant IBM's hex and binary floating point
00039 *>    arithmetics, but not for decimal.
00040 *> \endverbatim
00041 *
00042 *  Arguments:
00043 *  ==========
00044 *
00045 *> \param[in] N
00046 *> \verbatim
00047 *>          N is INTEGER
00048 *>            The length of vectors X, Y, and W.
00049 *> \endverbatim
00050 *>
00051 *> \param[in,out] X
00052 *> \verbatim
00053 *>          X is REAL array, dimension (N)
00054 *>            The first part of the doubled-single accumulation vector.
00055 *> \endverbatim
00056 *>
00057 *> \param[in,out] Y
00058 *> \verbatim
00059 *>          Y is REAL array, dimension (N)
00060 *>            The second part of the doubled-single accumulation vector.
00061 *> \endverbatim
00062 *>
00063 *> \param[in] W
00064 *> \verbatim
00065 *>          W is REAL array, dimension (N)
00066 *>            The vector to be added.
00067 *> \endverbatim
00068 *
00069 *  Authors:
00070 *  ========
00071 *
00072 *> \author Univ. of Tennessee 
00073 *> \author Univ. of California Berkeley 
00074 *> \author Univ. of Colorado Denver 
00075 *> \author NAG Ltd. 
00076 *
00077 *> \date November 2011
00078 *
00079 *> \ingroup realOTHERcomputational
00080 *
00081 *  =====================================================================
00082       SUBROUTINE SLA_WWADDW( N, X, Y, W )
00083 *
00084 *  -- LAPACK computational routine (version 3.4.0) --
00085 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
00086 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
00087 *     November 2011
00088 *
00089 *     .. Scalar Arguments ..
00090       INTEGER            N
00091 *     ..
00092 *     .. Array Arguments ..
00093       REAL               X( * ), Y( * ), W( * )
00094 *     ..
00095 *
00096 *  =====================================================================
00097 *
00098 *     .. Local Scalars ..
00099       REAL               S
00100       INTEGER            I
00101 *     ..
00102 *     .. Executable Statements ..
00103 *
00104       DO 10 I = 1, N
00105         S = X(I) + W(I)
00106         S = (S + S) - S
00107         Y(I) = ((X(I) - S) + W(I)) + Y(I)
00108         X(I) = S
00109  10   CONTINUE
00110       RETURN
00111       END
 All Files Functions