sla_wwaddw.c
Go to the documentation of this file.
00001 /* sla_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 sla_wwaddw__(integer *n, real *x, real *y, real *w)
00017 {
00018     /* System generated locals */
00019     integer i__1;
00020 
00021     /* Local variables */
00022     integer i__;
00023     real s;
00024 
00025 
00026 /*     -- LAPACK routine (version 3.2)                                 -- */
00027 /*     -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and -- */
00028 /*     -- Jason Riedy of Univ. of California Berkeley.                 -- */
00029 /*     -- November 2008                                                -- */
00030 
00031 /*     -- LAPACK is a software package provided by Univ. of Tennessee, -- */
00032 /*     -- Univ. of California Berkeley and NAG Ltd.                    -- */
00033 
00034 /*     .. */
00035 /*     .. Scalar Arguments .. */
00036 /*     .. */
00037 /*     .. Array Arguments .. */
00038 /*     .. */
00039 
00040 /*     Purpose */
00041 /*     ======= */
00042 
00043 /*     SLA_WWADDW adds a vector W into a doubled-single vector (X, Y). */
00044 
00045 /*     This works for all extant IBM's hex and binary floating point */
00046 /*     arithmetics, but not for decimal. */
00047 
00048 /*     Arguments */
00049 /*     ========= */
00050 
00051 /*     N      (input) INTEGER */
00052 /*            The length of vectors X, Y, and W. */
00053 
00054 /*     X, Y   (input/output) REAL array, length N */
00055 /*            The doubled-single accumulation vector. */
00056 
00057 /*     W      (input) REAL array, length N */
00058 /*            The vector to be added. */
00059 /*     .. */
00060 /*     .. Local Scalars .. */
00061 /*     .. */
00062 /*     .. Executable Statements .. */
00063 
00064     /* Parameter adjustments */
00065     --w;
00066     --y;
00067     --x;
00068 
00069     /* Function Body */
00070     i__1 = *n;
00071     for (i__ = 1; i__ <= i__1; ++i__) {
00072         s = x[i__] + w[i__];
00073         s = s + s - s;
00074         y[i__] = x[i__] - s + w[i__] + y[i__];
00075         x[i__] = s;
00076 /* L10: */
00077     }
00078     return 0;
00079 } /* sla_wwaddw__ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:56:09