dla_wwaddw.c
Go to the documentation of this file.
00001 /* dla_wwaddw.f -- translated by f2c (version 20061008).
00002    You must link the resulting object file with libf2c:
00003         on Microsoft Windows system, link with libf2c.lib;
00004         on Linux or Unix systems, link with .../path/to/libf2c.a -lm
00005         or, if you install libf2c.a in a standard place, with -lf2c -lm
00006         -- in that order, at the end of the command line, as in
00007                 cc *.o -lf2c -lm
00008         Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
00009 
00010                 http://www.netlib.org/f2c/libf2c.zip
00011 */
00012 
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015 
00016 /* Subroutine */ int dla_wwaddw__(integer *n, doublereal *x, doublereal *y, 
00017         doublereal *w)
00018 {
00019     /* System generated locals */
00020     integer i__1;
00021 
00022     /* Local variables */
00023     integer i__;
00024     doublereal s;
00025 
00026 
00027 /*     -- LAPACK routine (version 3.2)                                 -- */
00028 /*     -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and -- */
00029 /*     -- Jason Riedy of Univ. of California Berkeley.                 -- */
00030 /*     -- November 2008                                                -- */
00031 
00032 /*     -- LAPACK is a software package provided by Univ. of Tennessee, -- */
00033 /*     -- Univ. of California Berkeley and NAG Ltd.                    -- */
00034 
00035 /*     .. */
00036 /*     .. Scalar Arguments .. */
00037 /*     .. */
00038 /*     .. Array Arguments .. */
00039 /*     .. */
00040 
00041 /*     Purpose */
00042 /*     ======= */
00043 
00044 /*     DLA_WWADDW adds a vector W into a doubled-single vector (X, Y). */
00045 
00046 /*     This works for all extant IBM's hex and binary floating point */
00047 /*     arithmetics, but not for decimal. */
00048 
00049 /*     Arguments */
00050 /*     ========= */
00051 
00052 /*     N      (input) INTEGER */
00053 /*            The length of vectors X, Y, and W. */
00054 
00055 /*     X, Y   (input/output) DOUBLE PRECISION array, length N */
00056 /*            The doubled-single accumulation vector. */
00057 
00058 /*     W      (input) DOUBLE PRECISION array, length N */
00059 /*            The vector to be added. */
00060 /*     .. */
00061 /*     .. Local Scalars .. */
00062 /*     .. */
00063 /*     .. Executable Statements .. */
00064 
00065     /* Parameter adjustments */
00066     --w;
00067     --y;
00068     --x;
00069 
00070     /* Function Body */
00071     i__1 = *n;
00072     for (i__ = 1; i__ <= i__1; ++i__) {
00073         s = x[i__] + w[i__];
00074         s = s + s - s;
00075         y[i__] = x[i__] - s + w[i__] + y[i__];
00076         x[i__] = s;
00077 /* L10: */
00078     }
00079     return 0;
00080 } /* dla_wwaddw__ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:45