LAPACK 3.3.1
Linear Algebra PACKage

zla_wwaddw.f

Go to the documentation of this file.
00001       SUBROUTINE ZLA_WWADDW( N, X, Y, W )
00002 *
00003 *     -- LAPACK routine (version 3.2.2)                                 --
00004 *     -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
00005 *     -- Jason Riedy of Univ. of California Berkeley.                 --
00006 *     -- June 2010                                                    --
00007 *
00008 *     -- LAPACK is a software package provided by Univ. of Tennessee, --
00009 *     -- Univ. of California Berkeley and NAG Ltd.                    --
00010 *
00011       IMPLICIT NONE
00012 *     ..
00013 *     .. Scalar Arguments ..
00014       INTEGER            N
00015 *     ..
00016 *     .. Array Arguments ..
00017       COMPLEX*16         X( * ), Y( * ), W( * )
00018 *     ..
00019 *
00020 *     Purpose
00021 *     =======
00022 *
00023 *     ZLA_WWADDW adds a vector W into a doubled-single vector (X, Y).
00024 *
00025 *     This works for all extant IBM's hex and binary floating point
00026 *     arithmetics, but not for decimal.
00027 *
00028 *     Arguments
00029 *     =========
00030 *
00031 *     N      (input) INTEGER
00032 *            The length of vectors X, Y, and W.
00033 *
00034 *     X      (input/output) COMPLEX*16 array, dimension (N)
00035 *            The first part of the doubled-single accumulation vector.
00036 *
00037 *     Y      (input/output) COMPLEX*16 array, dimension (N)
00038 *            The second part of the doubled-single accumulation vector.
00039 *
00040 *     W      (input) COMPLEX*16 array, dimension (N)
00041 *            The vector to be added.
00042 *
00043 *  =====================================================================
00044 *
00045 *     .. Local Scalars ..
00046       COMPLEX*16         S
00047       INTEGER            I
00048 *     ..
00049 *     .. Executable Statements ..
00050       DO 10 I = 1, N
00051         S = X(I) + W(I)
00052         S = (S + S) - S
00053         Y(I) = ((X(I) - S) + W(I)) + Y(I)
00054         X(I) = S
00055    10 CONTINUE
00056       RETURN
00057       END
 All Files Functions