VEC_$DMULT_ADD_CONSTANT Domain/OS VEC_$DMULT_ADD_CONSTANT
NAME
vec_$dmult_add_constant - multiply two double-precision vectors, add a
scalar
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/vec.h>
void vec_$dmult_add_constant(
double *start_vec,
double *mult_vec,
long int &length,
double &constant,
double *result_vec)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/vec.ins.pas';
procedure vec_$dmult_add_constant(
in start_vec: univ vec_$double_vector;
in mult_vec: univ vec_$double_vector;
in length: integer32;
in constant: double;
out result_vec: univ vec_$double_vector);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/vec.ins.ftn'
parameter (nvec = 10)
real*8 start_vec(nvec), mult_vec(nvec), result_vec(nvec), constant
integer*4 length
call vec_$dmult_add_constant(start_vec, mult_vec, length, constant, result_vec)
DESCRIPTION
Vec_$dmult_add_constant multiplies the vector start_vec by mult_vec, adds
a scalar constant to the product, and stores the result in result_vec.
It differs from vec_$mult_add_constant in that the vectors being handled
are double-precision floating-point.
The calculation performed is as follows:
For each integer I such that 1 <= I <= length,
result_vec(I) = (start_vec(I) x mult_vec(I)) + constant
Note that the multiplication done by this call is point-wise. This call
does not perform matrix multiplication, since the product of two vectors
is another vector of the same magnitude.
start_vec
The vector to be multiplied.
mult_vec
The multiplicand vector.
length
The number of elements to be operated on; normally the same as the
number of elements in the vectors.
constant
The scalar to be added to the result of the multiplication.
result_vec
The vector created by multiplying start_vec and mult_vec and adding
constant to the result.
NOTES
When vec_$dmult_add_constant is used to operate on matrixes in C and Pas-
cal, mult_vec, result_vec, and start_vec are row vectors; in FORTRAN,
they are column vectors.
As in all the vec_$ calls, the result array must not overlap any of the
input arrays; the result array may be identical to an input, but must not
contain any subset of it. Because of pipelining, using overlapping
input and output arrays may cause incorrect results.
SEE ALSO
vec_$mult_add_constant, vec_$add_mult_constant, vec_$sub_mult_constant,
vec_$mult_rsub_constant, vec_$mult_add_constant_i,
vec_$dmult_add_constant_i, vec_$imult_add_constant,
vec_$imult_add_constant_i, vec_$imult_add_constant16,
vec_$imult_add_constant16_i.