|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1536 (0x600) Types: TextFile Names: »algbrinvert«
└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ. Detaljer om "HC8000" projekt. └─⟦0364f57e3⟧ └─⟦7e928b248⟧ »algbib« └─⟦this⟧
;gosav brinvert=set 35 permanent brinvert.15 brinvert=algol list.yes index.no begin integer n,i,j,k; read(in,n); begin real t,s; array a,b(1:n,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; for i:=1 step 1 until n 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; closeres:= outmedium(res); write(res,<: Input matrix: :>); writemat(a,n,n); invert(n,a,b); write(res,<: Inverted matrix: :>); writemat(b,n,n); write(res,<:<25>:>); close(res,closeres); end end; ▶EOF◀