IdentificationDivision. Program-Id. Victor. * Buch "Introduction to Cybernetics", 1966 * von Viktor Gluschkow * p270 DataDivision. Working-StorageSection.
78 n value 100.
77 i pic 9(4).
77 j pic 9(4).
77 k pic 9(4).
77 y pic 9(4)V99.
77 s pic 9(4)V99.
77 d pic 9(4)V99.
77 r pic 9(4)V99.
77 a pic 9(4)V99 occurs n.
77 b pic 9(4)V99 occurs n.
01 p pic 9(4)V99 occurs n. ProcedureDivision. * Formula
L. accept b movefunction f(b) to y move 0 to s performvarying i from 1 until i=n add d to a(i) display a accept b compute p(i)=(function f(b)-y)/d compute s=s+p(i)*p(i) subtract d from a(i) end-perform compute r=d/function sqrt(s) performvarying i from 1 until i=n compute a(i)=r*p(i)+a(i) end-perform display a accept b iffunction abs(y - function f(b))>1 thengoto L else performvarying k from 1 until k=n compute a(i)=a(i)-r*p(i) end-perform end-if display a goto L. * P=??? End-Program Victor.
¤ Dauer der Verarbeitung: 0.16 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.