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

⟦03d694ec8⟧ TextFile

    Length: 768 (0x300)
    Types: TextFile
    Names: »george«

Derivation

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

TextFile


pH i vand. opl. af n tilsatte syrer
begin
integer i,n;
real ha,hb,ht,COH,Kw,Kw2,s,ha1;
n:=readi (<: antal syrer tilsat :>);
begin
array K(1:n),C(1:n);
for i:=1 step 1 until n do
read(in,C(i),K(i))
;
Kw:='-14;
Kw2:=sqrt(Kw);
ha1:=0;
for i:=1 step 1 until n do
begin
K(i):=10**(-(K(i)));
ha1:=ha1+C(i);
end;
repeat
COH:=readr(<: COH :>);
ha:=ha1-COH;
ha:=if ha>0 then Kw2+ha else Kw2;
hb:= if COH<0 then Kw2 else Kw/(COH+Kw2);
for ht:= sqrt(ha*hb) while ha/hb>1.0005 do
begin
s:=ht-Kw/ht+COH;
for i:=1 step 1 until n do
s:=s-K(i)*C(i)/(K(i)+ht);
if s>0 then ha:=ht else hb:=ht
end;
write1(out,<: PH= :>, -(ln(ht)/ln10),"nl",1);
until -,readb(<: mere  :>);
end end
▶EOF◀