Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VEC_$DADD_VECTOR                  Domain/OS                   VEC_$DADD_VECTOR


NAME
     vec_$dadd_vector - add two double-precision vectors

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

     void vec_$dadd_vector(
          double *start_vec,
          double *add_vec,
          long int &length,
          double *result_vec)

SYNOPSIS (Pascal)
     %include '/sys/ins/base.ins.pas';
     %include '/sys/ins/vec.ins.pas';

     procedure vec_$dadd_vector(
          in start_vec: univ vec_$double_vector;
          in add_vec: univ vec_$double_vector;
          in length: integer32;
          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 start_vec(nvec), add_vec(nvec), result_vec(nvec)
           integer*4 length

           call vec_$dadd_vector(start_vec, add_vec, length, result_vec)

DESCRIPTION
     Vec_$dadd_vector adds the double-precision vectors start_vec and add_vec
     and supplies the vector sum in result_vec.

     In C, the resulting operation is

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

     In Pascal, the resulting operation is

          for i := 1 to length do
               begin
               result_vec[i] := start_vec[i] + add_vec[i];
               end

     In FORTRAN, the resulting operation is

           do 10 i = 1, length
               result_vec(i) = start_vec(i) + add_vec(i)
       10 continue

     start_vec
          An addend vector.

     add_vec
          An addend vector.

     length
          Number of elements to sum.  Length is usually just the order of the
          addends.

     result_vec
          The vector that is the sum of start_vec and add_vec.

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

SEE ALSO
     vec_$add_vector, vec_$iadd_vector, vec_$iadd_vector16.

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