hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_blast_zaxpby (f16gc)

Purpose

nag_blast_zaxpby (f16gc) computes the sum of two scaled vectors, for complex scalars and vectors.

Syntax

[y] = f16gc(n, alpha, x, incx, beta, y, incy)
[y] = nag_blast_zaxpby(n, alpha, x, incx, beta, y, incy)

Description

nag_blast_zaxpby (f16gc) performs the operation
y αx + βy,
y αx+βy,
where xx and yy are nn-element complex vectors, and αα and ββ are complex scalars. If nn is less than or equal to zero, or if αα is equal to zero and ββ is equal to 11, this function returns immediately.

References

Basic Linear Algebra Subprograms Technical (BLAST) Forum (2001) Basic Linear Algebra Subprograms Technical (BLAST) Forum Standard University of Tennessee, Knoxville, Tennessee http://www.netlib.org/blas/blast-forum/blas-report.pdf

Parameters

Compulsory Input Parameters

1:     n – int64int32nag_int scalar
nn, the number of elements in xx and yy.
2:     alpha – complex scalar
The scalar αα.
3:     x(1 + (n1) × |incx|1+(n-1)×|incx|) – complex array
The nn-element vector xx.
If incx > 0incx>0, xixi must be stored in x(1 + (i1) × incx)x1+(i-1)×incx, for i = 1,2,,ni=1,2,,n.
If incx < 0incx<0, xixi must be stored in x(1(ni) × incx)x1-(n-i)×incx, for i = 1,2,,ni=1,2,,n.
Intermediate elements of x are not referenced.
4:     incx – int64int32nag_int scalar
The increment in the subscripts of x between successive elements of xx.
Constraint: incx0incx0.
5:     beta – complex scalar
The scalar ββ.
6:     y(1 + (n1) × |incy|1+(n-1)×|incy|) – complex array
The nn-element vector yy.
If incy > 0incy>0, yiyi must be stored in y(1 + (i1) × incy)y1+(i-1)×incy, for i = 1,2,,ni=1,2,,n.
If incy < 0incy<0, yiyi must be stored in y(1(ni) × incy)y1-(n-i)×incy, for i = 1,2,,ni=1,2,,n.
Intermediate elements of y are not referenced.
7:     incy – int64int32nag_int scalar
The increment in the subscripts of y between successive elements of yy.
Constraint: incy0incy0.

Optional Input Parameters

None.

Input Parameters Omitted from the MATLAB Interface

None.

Output Parameters

1:     y(1 + (n1) × |incy|1+(n-1)×|incy|) – complex array
The updated vector yy stored in the array elements used to supply the original vector yy.
Intermediate elements of y are unchanged.

Error Indicators and Warnings

Accuracy

The BLAS standard requires accurate implementations which avoid unnecessary over/underflow (see Section 2.7 of Basic Linear Algebra Subprograms Technical (BLAST) Forum (2001)).

Further Comments

None.

Example

function nag_blast_zaxpby_example
n = int64(3);
alpha =  3 + 2i;
x = [ -4 + 2.1i; 3.7 + 4.5i; -6 + 1.2i];
incx = int64(-1);
beta =  0 - 1i;
y = [ -3 - 2.4i; 6.4 - 5i; -5.1 + 0i];
incy = int64(-1);
[y] = nag_blast_zaxpby(n, alpha, x, incx, beta, y, incy)
 

y =

 -18.6000 + 1.3000i
  -2.9000 +14.5000i
 -20.4000 - 3.3000i


function f16gc_example
n = int64(3);
alpha =  3 + 2i;
x = [ -4 + 2.1i; 3.7 + 4.5i; -6 + 1.2i];
incx = int64(-1);
beta =  0 - 1i;
y = [ -3 - 2.4i; 6.4 - 5i; -5.1 + 0i];
incy = int64(-1);
[y] = f16gc(n, alpha, x, incx, beta, y, incy)
 

y =

 -18.6000 + 1.3000i
  -2.9000 +14.5000i
 -20.4000 - 3.3000i



PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013