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

⟦da804ed48⟧ TextFile

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

Derivation

└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
    └─⟦b2ec5d50f⟧ 
        └─⟦09b4e9619⟧ »thcømat« 
            └─⟦this⟧ 

TextFile

\f


message min1b

min1b=algol
external
real procedure min1b(f,x,step1,eps,minstep,d2);
value eps,minstep;
real f,x,step1,eps,minstep,d2;
begin
  real minstep1,q0,q1,q2,x0,q,stepp;
  minstep1:=1/minstep; stepp:=step1;
  if stepp<minstep**2 and stepp>minstep1**2 then stepp:=minstep**2;
  q0:=f; x0:=x;
  x:=x0*stepp; q1:=f;
  if q1>q0 then 
  begin
    stepp:=1/stepp; q2:=q1;
    x:=x0*stepp; q1:=f  
  end;
  if q1<q0 then 
  begin
    x0:=x; q2:=q0; q0:=q1; x:=x0*stepp;
    for q1:=f while q1<q0 do 
    begin
      q0:=q1; x0:=x; stepp:=stepp**2; x:=x0*stepp 
    end 
  end;
  for stepp:=sqrt(stepp) while (stepp>=minstep or stepp<=minstep1)
      and (q1+q2-2*q0)*3>(abs(q1)+abs(q2)+abs(q0))*eps do 
  begin
    if q1>q2 then 
    begin
      stepp:=1/stepp; q:=q1; q1:=q2; q2:=q 
    end;
    x:=x0*stepp; q:=f;
    if q>=q0 then 
    begin
      stepp:=1/stepp; q1:=q2; q2:=q; x:=x0*stepp; q:=f 
    end;
    if q<q0 then 
    begin
      x0:=x; q2:=q0; q0:=q; 
    end
    else q1:=q 
  end;
  min1b:=q0; x:=x0; step1:=stepp;
  d2:=(if stepp<>1.0 then (q2+q1-2*q0)/(2*x0*(stepp-1))**2
  else -1);
end min1b
; end
▶EOF◀