|
|
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: »ex20r4«
└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ. Detaljer om "HC8000" projekt.
└─⟦0364f57e3⟧
└─⟦this⟧ »ex20r4«
└─⟦667bb35d6⟧ Bits:30007480 RC8000 Dump tape fra HCØ.
└─⟦4334b4c0b⟧
└─⟦this⟧ »ex20r4«
pH af polyvalent syre i vand
begin
integer i,j,n;
real Ca,COH,Kw,Kw2,ha,hb,ht,s0,s1;
n:=readi(<:valens af syre:>);
begin
array K(1:n);
repeat
write(out,<:pK1,pK2,........pKn:>,n);
outendcur('nl');
i:=read(in,K);
until i=n;
for i:=1 step 1 until n do K(i):=10**(-K(i));
Kw:='-14; Kw2:=sqrt(Kw);
MORE:
Ca:=readr(<:Ca:>);
COH:=readr(<:COH:>);
ha:=Ca*n - 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
s0:=K(n)/ht; s1:=s0*n;
for i:=n-1 step -1 until 1 do
begin
s0:=(s0+1)*K(i)/ht;
s1:=(s1+i)*K(i)/ht
end;
s0:=ht + COH - Kw/ht - Ca*s1/(s0+1);
if s0>0 then ha:=ht else hb:=ht
end;
write(out,<:pH = :>,-ln(ht)/ln10);
if readb(<:flere koncentationsværdier:>) then goto MORE
end end
▶EOF◀