identificationdivision. program-id. golden. * aus D.Nowottny p. 95 * Mathematik am Computer author. "JD". date-written. 24.9.2006. date-compiled. datadivision. working-storagesection. 77 delta pic9(4)V9(8). 77 as pic9(4)V9(8). 77 bs pic9(4)V9(8). 77 bss pic9(4)V9(8). 77 fa pic9(4)V9(8). 77 fb pic9(4)V9(8). 77 fas pic9(4)V9(8). 77 fbs pic9(4)V9(8). 77 r pic9(4)V9(8). linkagesection. 77 a pic9(4)V9(8). 77 b pic9(4)V9(8). 77 f pic x(8). 77 x pic9(4)V9(8). proceduredivisionusing f a b x. * Suche einen lokalen Minimums in [a,b] compute delta = 1e-8 compute r = (function sqrt(5)-1)/2 compute as = a+(1-r)*(b-a) compute bs = a+r*(b-a) compute fa = function f(a) compute fb = function f(b) compute fas = function f(as) compute fbs = function f(bs) performuntil b-a<=delta if fas<=fbs then move bs to b move fbs to fb move as to bs move fas to fbs compute as = a+(1-r)*(b-a) compute fas = function f(as) else move as to a move fas to fa move bs to as move fbs to fas compute bs = a+r*(b-a) compute fas = function f(bss) end-if end-perform compute x = (a+b)/2 * (ein) Minimum ist in x end-program golden.
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-07)
¤
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 und die Messung sind noch experimentell.