DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦786d2978c⟧ TextFile

    Length: 1536 (0x600)
    Types: TextFile
    Names: »algmatpr«

Derivation

└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ.  Detaljer om "HC8000" projekt.
    └─⟦0364f57e3⟧ 
        └─⟦7e928b248⟧ »algbib« 
            └─⟦this⟧ 

TextFile

;gosav
matpr=set 35
permanent matpr.15
matpr=algol list.yes index.no
begin
integer l,m,n,i,j,k;
read(in,l,m,n);
begin
real t,s;
array a(1:l,1:m),b(1:m,1:n),c(1:l,1:n);
boolean closeres;
zone res(128,1,stderror);
procedure writemat(b,m,n);
value m,n; integer m,n; array b;
begin
for i:=1 step 1 until m do begin
   write(res,<:<10>:>);
   for j:=1 step 1 until n do begin
      t:= s:= b(i,j);
      if abs t<'-7 then k:=1 else begin
         k:= 0;
         for k:= k+1 while
            k<65 and abs(t-round t)>abs t*'-7 do t:= t+s;
      end;
      if k>64 then write(res,<<-dd.ddd>,b(i,j))
      else begin
         write(res,<<-ddd>,t);
         if k>1 then
         write(res,<:/:>,<<d>,k,false add 32,1-k//10)
         else write(res,<:   :>)
      end;
      if j//10*10=j then write(res,<:<10>:>)
   end;
   j:= j-1; if j//10*10<j and j>10 then write(res,<:<10>:>)
end; write(res,<:<10>:>) end;
procedure readmat(a,m,n);
value m,n; integer m,n; array a;
begin
for i:=1 step 1 until m do
for j:=1 step 1 until n do begin
   read(in,t); repeatchar(in); readchar(in,k);
   if k=47 then begin
      read(in,s); t:= t/s
   end;
   a(i,j):= t
end end;
closeres:= outmedium(res);
readmat(a,l,m); readmat(b,m,n); write(res,<:
Input matrices (A,B):
:>); writemat(a,l,m); writemat(b,m,n);
for i:=1 step 1 until l do
for j:=1 step 1 until n do
   c(i,j):= sum(a(i,k)*b(k,j),k,1,m);
write(res,<:
Product matrix (A*B):
:>); writemat(c,l,n);
write(res,<:<25>:>); close(res,closeres);
end end;
▶EOF◀