Re: OFF-TOPIC: Algol 60 guru required

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2009-08-04 at 10:28 +0400, Hiisi wrote:
> Here's a fragment of the initial code:
> PROCEDURE QUINEQ(INTEGER VALUE N1,N2; REAL ARRAY Y,B,C,D,E,F(*));
>    IF N2>N1+1 THEN
>    BEGIN
>       INTEGER N;
>       REAL P,Q,R,S,T,U,V;
>       N:=N2-3;  P:=Q:=R:=S:=T:=0.0;
>       FOR I:=N1 STEP 1 UNTIL N DO
>       BEGIN
>          U:=P*R;  B(I):=1.0/(66.0-U*R-Q);
>          C(I):=R:=26.0-U;
>          D(I):=Y(I+3)-3.0*(Y(I+2)-Y(I+1))-Y(I)-U*S-Q*T;
>          Q:=P;  P:=B(I);  T:=S;  S:=D(I)
>       END I;
>       D(N+1):=N(N+2):=0.0;
> And quotation from paper (year of publication: 1976), that describes
> the  algorithm: "These procedures have been tested in Algol 60 on the 
> Telefunken TR-440 computer at the Leibniz-Rechenzentrum of the
> Bavarian Academy of Sciences, Munich, and in Algol W on the I B M
> 360/67 at the Stanford Center for Information 
> Processing."
> It's accessible here: 
> http://portal.acm.org/citation.cfm?id=355694.355701 -> 507.gz

The same function is available in FORTRAN at:
http://portal.acm.org/citation.cfm?doid=357456.357465 -> 600.gz

These pages refer to the actual papers as .pdf files and to the
algorithms as .gz files, both downloadable.

The FORTRAN implementation doesn't seem to have the perplexing line in
it at all (if present it would be around line 296 of the FORTRAN).  I
suspect that the line is a typo, and should read:
	D(N+1):=D(N+2):=0.0;
or some such thing.  It appears to be initialization for the following
lines, which are:
	FOR I:=N STEP -1 UNTIL N1 DO
	  D(I):=(D(I)-C(I)*D(I+1)-D(I+2))*B(I);
The FORTRAN takes advantage of the fact that (if my rusty FORTRAN is
correct) in FORTRAN arrays are initialized to 0.0 by the run time
system, so the initialization is not necessary.  To verify all this
someone will have to take a careful look at the original math in
the .pdf files.

(Fun, but *really* OT.)




-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux