Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VEC_$DMULT_CONSTANT               Domain/OS                VEC_$DMULT_CONSTANT


NAME
     vec_$dmult_constant - multiply a double-precision vector by a scalar

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/vec.h>

     void vec_$dmult_constant(
          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_constant(
          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)

           double precision mult_vec(nvec), result_vec(nvec), constant
           integer*4 length

           call vec_$dmult_constant(mult_vec, length, constant, result_vec)

DESCRIPTION
     Vec_$dmult_constant multiplies the double-precision array mult_vec by the
     scalar value constant and supplies the result in the array result_vec.

     In C, the resulting operation is

          for (i = 0; i < length; ++i)
               result_vec[i] = constant * start_vec[i];

     In Pascal, the resulting operation is

          for i := 1 to length do
               begin
               result_vec[i] := constant * start_vec[i];
               end

     In FORTRAN, the resulting operation is

           do 10 i = 1, length
               result_vec(i) = constant * mult_vec(i)
       10  continue

     mult_vec
          The vector to multiply by constant.

     length
          The number of elements to multiply.

     constant
          The scalar constant to multiply mult_vec by.

     result_vec
          The vector resulting from multiplying mult_vec by constant.

NOTES
     When vec_$dmult_constant is used to operate on matrixes in C and Pascal,
     mult_vec and result_vec are row vectors; whereas in FORTRAN, they are
     column vectors.

SEE ALSO
     vec_$dmult_constant_i, vec_$imult_constant, vec_$imult_constant16,
     vec_$mult_constant.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026