LAPACK 3.3.0
|
00001 SUBROUTINE CLA_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 X( * ), Y( * ), W( * ) 00018 * .. 00019 * 00020 * Purpose 00021 * ======= 00022 * 00023 * CLA_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 array, dimension (N) 00035 * The first part of the doubled-single accumulation vector. 00036 * 00037 * Y (input/output) COMPLEX array, dimension (N) 00038 * The second part of the doubled-single accumulation vector. 00039 * 00040 * W (input) COMPLEX array, dimension (N) 00041 * The vector to be added. 00042 * 00043 * ===================================================================== 00044 * 00045 * .. Local Scalars .. 00046 COMPLEX S 00047 INTEGER I 00048 * .. 00049 * .. Executable Statements .. 00050 * 00051 DO 10 I = 1, N 00052 S = X(I) + W(I) 00053 S = (S + S) - S 00054 Y(I) = ((X(I) - S) + W(I)) + Y(I) 00055 X(I) = S 00056 10 CONTINUE 00057 RETURN 00058 END