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

Quelle  chaff.cob   Sprache: Cobol

 

       identification division.
       program-id. chaff.
       author. "David Gries".
      * aus "Eliminating the Chaff"
      * Marktoberndorff 1996
       date-written. 25.10.2004.
       date-compiled.
       data division.
       working-storage section.
        77 i  pic 99.
        77 j  pic 99.
        77 e  pic 99.
        77 n  pic 99.
       linkage section.
        01 a occurs 9.
          02 b occurs 9 pic 99.
        77 x  pic 99.
       procedure division using a x.
         move length of a to n
         move -1 to i
         move n to j
         perform until i+1 not = j
           compute e=function mod(i+j,2)
           if b(e)<=x move i to e
           else       move j to e
         end-perform
      *  now ??
      *  interval inclusion for minimum??
        end-program chaff.

Messung V0.5 in Prozent
C=87 H=100 G=93

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-09-28) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Dauer der Verarbeitung:

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.