|
|
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: »hntekst«
└─⟦667bb35d6⟧ Bits:30007480 RC8000 Dump tape fra HCØ.
└─⟦4334b4c0b⟧
└─⟦this⟧ »hntekst«
pH i en blanding af n monobasiske syrer
begin
integer i,n;
real h,KW,COH,ha,hb,Ct,ht,s;
n:=readi(<:antal syrer :>);
KW:='-14;
begin
array K,C(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));
repeat
write(out,<:C1,C2,......,Cn:>);
outendcur('nl');
i:=read(in,C);
until i=n;
MORE:
COH:=readr(<:COH:>);
Ct:=0;
for i:=1 step 1 until n do
Ct:=Ct+C(i);
ha:=Ct-COH;
ha:=if ha>0 then sqrt(KW)+ha else sqrt(KW);
hb:= if COH<0 then sqrt(KW) else KW/(COH+sqrt(KW));
for ht:= sqrt(ha*hb) while ha/hb>1.0005 do
begin
s:=0;
for i:=1 step 1 until n do
s:= K(i)*C(i)/(K(i)+ht)+s;
s:= ht-KW/ht+COH-s;
if s>0 then ha:=ht else hb:=ht;
end;
write(out,<:pH=:>,-ln(ht)/ln10);
if readb (<:ny COH:>) then goto MORE;
end
end
f
▶EOF◀