Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Cobol/verschiedene-Autoren/Gaehde/   (verschiedene Autoren Version 0.7©)  Datei vom 7.0.2011 mit Größe 828 B image not shown  

SSL stau-p159.cob   Sprache: Cobol

 

       Identification Division.
       Program-Id. Metropolis.
      * from Stauffer/Stanley
      * From Newton to Mandelbrot
      * Springer 1996
       Data Division.
       Working-Storage Section.
         01 dis        pic S9(4)V9(4) occurs 1680.
         77 w          pic S9(4)V9(4) occurs 9.
         77 vy          pic S9(4)V9(4).
         77 dt          pic S9(4)V9(4).
       Procedure Division.
        move 40 to L
        move 2.5 to t
        compute L1=L+1
        compute Lp=L*L+L
        compute Lm=Lp+1
        perform varying i from 1 until i>Lm
          move 1 to is(i)
        end-Perform
        perform varying ie from 1 by 2 until ie>9
          compute ex=function exp(-2*(ie-5)/t)
          compute w(ie)=ex/(1+ex)
        end-Perform
        perform varying it from 1 until it>100
          move 0 to m
          perform varying i from L1 until i>Lp
            compute ie=5+is(i)*(is(i-1)+is(i+1)+is(i-L)+is(i+L))
            if function rnd(i)<w(ie) then move -is(i) to is(i)
            add is(i) to m
          end-Perform
          display it, m
        end-Perform
       End-Program Metropolis.


Messung
CHZG
869510093

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*Bot Zugriff