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

⟦db64ccef8⟧ TextFile

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

Derivation

└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ.  Detaljer om "HC8000" projekt.
    └─⟦0364f57e3⟧ 
        └─⟦this⟧ »bjarne« 

TextFile

Bestemmelse af pH for n syre/base par ved bisection
begin
integer n,i;
real x;
n:=readi(<:antal syre/base par:>);
begin
array C,K,PK(1:n);
real procedure sum(K,C,n,x);
value x,n;
real x; integer n; array K,C;
begin
real s;
integer i;
s:='-14/x;
for i:=1 step 1 until n do
s:=K(i)*C(i)/(x+K(i))+s;
sum:=s
end sum;
write(out,<:<'nl'>konc.,pK-værdi:>);
outendcur('nl');
for i:=1 step 1 until n do
read(in,C(i),PK(i));
for i:=1 step 1 until n do
K(i):=10**(-PK(i));
if -,bisec(sum(K,C,n,x)-x,x,'-14,1,0) then write(out,<:fejl:>);
write(out,"nl",4,"sp",4,<:i:>,"sp",8,<:c(i):>,"sp",8,<:pK(i):>,"nl",2);
for i:=1 step 1 until n do
write(out,<<  ddd>,i,"sp",8,<<dd.dd>,C(i),"sp",7,<<-dd.dd>,PK(i),"nl",1);
write(out,"nl",3,<:pH = :>,-ln(x)/ln10);
end
end
▶EOF◀