1: SUBROUTINE ZLA_WWADDW( N, X, Y, W )
2: *
3: * -- LAPACK routine (version 3.2.2) --
4: * -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
5: * -- Jason Riedy of Univ. of California Berkeley. --
6: * -- June 2010 --
7: *
8: * -- LAPACK is a software package provided by Univ. of Tennessee, --
9: * -- Univ. of California Berkeley and NAG Ltd. --
10: *
11: IMPLICIT NONE
12: * ..
13: * .. Scalar Arguments ..
14: INTEGER N
15: * ..
16: * .. Array Arguments ..
17: COMPLEX*16 X( * ), Y( * ), W( * )
18: * ..
19: *
20: * Purpose
21: * =======
22: *
23: * ZLA_WWADDW adds a vector W into a doubled-single vector (X, Y).
24: *
25: * This works for all extant IBM's hex and binary floating point
26: * arithmetics, but not for decimal.
27: *
28: * Arguments
29: * =========
30: *
31: * N (input) INTEGER
32: * The length of vectors X, Y, and W.
33: *
34: * X (input/output) COMPLEX*16 array, dimension (N)
35: * The first part of the doubled-single accumulation vector.
36: *
37: * Y (input/output) COMPLEX*16 array, dimension (N)
38: * The second part of the doubled-single accumulation vector.
39: *
40: * W (input) COMPLEX*16 array, dimension (N)
41: * The vector to be added.
42: *
43: * =====================================================================
44: *
45: * .. Local Scalars ..
46: COMPLEX*16 S
47: INTEGER I
48: * ..
49: * .. Executable Statements ..
50: DO 10 I = 1, N
51: S = X(I) + W(I)
52: S = (S + S) - S
53: Y(I) = ((X(I) - S) + W(I)) + Y(I)
54: X(I) = S
55: 10 CONTINUE
56: RETURN
57: END
CVSweb interface <joel.bertrand@systella.fr>