Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-06 - 43,50416/cpak.sai
There are 2 other files named cpak.sai in the archive. Click here to see a list.
Entry;
COMMENT
.SEC(CPAK.SAI - complex variable package)
.index(CPAK.SAI - complex variable package)
.;
Begin "CPAK.SAI"

COMMENT



                  Peter Lemkin, Bruce Shapiro

                     Image Processing Unit

           Division of Cancer Biology and Diagnosis
                   National Cancer Institute
                 National Institutes of Health
                   Bethesda, Maryland 20014

                         301-496-2394

May 19, 1976- Lemkin, made procedures SIMPLE
April 8, 1976- Shapiro, fixed complex mult so will work
April 1, 1976 - Lemkin, basic Complex variable package

			Abstract
			--------
	This set of routines will manipulate complex  variables
(but not arrays) in SAIL.
. datetitle_(DATE&" "&TIME)
.next page
.ss(List of procedure calls)
.INDEX(List of procedure calls)
	The following is a  list  of  procedures  contained  in
CPAK.  The  actual argument data types is contained in a list
in the next section.

1.	COMPLEX (c) - declares c to be complex (in your program
	declaration list) The complex variable x as (REAL ARRAY
	c[1:2]).

2.	CZERO(c) - zero the complex variable x

3.	CADD(a,b,c) -  c <== a + b

4.	CSUB(a,b,c) -  c <== a - b

5.	CMUL(a,b,c) *  c <== a * b

6.	COEXP(rarg,c) - computes  complex  exponential  trig
	relationship of COS(rarg)+jSIN(rarg).

7.	CMAKE(rarg,iarg,c) - c <== rarg + j*iarg

8.	CSTORE(a,c) - c <== a

.next page
.ss(Table of Procedure Arguments)
.INDEX(Table of Procedure Arguments)
	a - Real Array a
	b - Real Array b
	c - Reference Real Array c
	rarg - Real rarg
	iarg - Real iarg
;
Require "DEFINE.REQ" Source!file;
COMMENT
.next page
.ss(Define COMPLEX)
.index(Define COMPLEX)

	COMPLEX (c) - declares c to be complex (in your program
	declaration list) The complex variable x as (REAL ARRAY
	c[1:2]).
.;

	Define COMPLEX(c) = "REAL ARRAY c[1:2];";

COMMENT
.next page
.ss(PROCEDURE CZERO)
.index(PROCEDURE CZERO)
.;
Internal Simple Procedure CZERO(Reference Real Array c);

Begin "CZERO"

#	CZERO(c) - zero the complex variable x;

	c[1]_0;
	c[2]_0;
End "CZERO";
COMMENT
.next page
.ss(PROCEDURE CADD)
.index(PROCEDURE CADD)
.;
Internal Simple Procedure CADD(Reference Real Array a, b, c);

Begin "CADD"

#	CADD(a,b,c) -  c <== a + b;

	c[1]_a[1]+b[1];
	c[2]_a[2]+b[2];
End "CADD";
COMMENT
.next page
.ss(PROCEDURE CSUB)
.index(PROCEDURE CSUB)
.;
Internal Simple Procedure CSUB(Reference Real Array a, b, c);

Begin "CSUB"

#	CSUB(a,b,c) -  c <== a - b;

	c[1]_a[1]-b[1];
	c[2]_a[2]-b[2];
End "CSUB";
COMMENT
.next page
.ss(PROCEDURE CMUL)
.index(PROCEDURE CMUL)
.;
Internal Simple Procedure CMUL(Reference Real Array a, b, c);

Begin "CMUL"

#	CMUL(a,b,c) -  c <== a * b;
	Real rtemp, itemp;

	rtemp_a[1]*b[1] - a[2]*b[2];
	itemp_a[1]*b[2] + a[2]*b[1];
	c[1]_rtemp;
	c[2]_itemp;
End "CMUL";
COMMENT
.next page
.ss(PROCEDURE COEXP)
.index(PROCEDURE COEXP)
.;
Internal Simple Procedure COEXP(Real x; Reference Real Array c);

Begin "COEXP"

#	COEXP(x,c) -  c <== COS(x) + j*SIN(x);

	c[1]_COS(x);
	c[2]_SIN(x);
End "COEXP";
COMMENT
.next page
.ss(PROCEDURE CMAKE)
.index(PROCEDURE CMAKE)
.;
Internal Simple Procedure CMAKE(Real rarg, iarg;
	 Reference Real Array c);

Begin "CMAKE"

#	CMAKE(rarg,iarg,c) -  c <== rarg + j*iarg;

	c[1]_rarg;
	c[2]_iarg;
End "CMAKE";
COMMENT
.next page
.ss(PROCEDURE CSTORE)
.index(PROCEDURE CSTORE)
.;
Internal Simple Procedure CSTORE(Reference Real Array a, c);

Begin "CSTORE"

#	CSTORE(a,c) -  c <== a;

	c[1]_a[1];
	c[2]_a[2];
End "CSTORE";
End "CPAK.SAI";