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

⟦4b457646a⟧ TextFile

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

Derivation

└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
    └─⟦b2ec5d50f⟧ 
        └─⟦this⟧ »truntest« 

TextFile

external real procedure runtest(n,p,f,i);
value n,p; integer n,p,i; real f;
begin
integer np,nm,nc,j,jm,ls,r;
real a,t,s,s1;
np:=nc:=ls:=0;
for i:=1 step 1 until n do
   if f>0 then begin
      np:=np+1;
      if ls=-1 then nc:=nc+1;
      ls:=1 end
   else begin
      if ls=1 then nc:=nc+1;
      ls:=-1 end;
if nc<p then 
   runtest:=0
else begin
   nm:=n-np;
   jm:=if np<nm then np+np
      else if nm<np then nm+nm else n-1;
   if p=0 then p:=1;
   if p=1 then begin
      s:=s1:=t:=1; p:=2 end
   else begin
      s:=s1:=0; t:=1 end;
   for j:=p step 1 until jm do begin
      if (false add j) then begin
         r:= j shift (-1);
         a:=t:=r*(nm-r)*(np-r)/r/r end
      else a:=t*(n-j)/j;
      s:=s+a;
      if j<=nc then s1:=s1+a;
      r:=s extract 12;
      if r>100 then begin
         a:= 1.0 add (r-1);
         s:=s/a; s1:=s1/a; t:=t/a end;
      end;
   runtest:=s1/s
 end
end; end
▶EOF◀