Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,23 @@
/* Matrix multiplication of A by B, yielding C */
MMULT: procedure (a, b, c);
declare (a, b, c)(*,*) float controlled;
declare (i, j, m, n, p) fixed binary;
if hbound(a,2) ^= hbound(b,1) then
do;
put skip list
('Matrices are incompatible for matrix multiplication');
signal error;
end;
m = hbound(a, 1); p = hbound(b, 2);
if allocation(c) > 0 then free c;
allocate c(m,p);
do i = 1 to m;
do j = 1 to p;
c(i,j) = sum(a(i,*) * b(*,j) );
end;
end;
end MMULT;