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

Quelle  simpson.cob

  Sprache: Cobol
 

       Identification Division.
       Program-Id. simpson.
       Data Division.
       Working-Storage Section.
         77 w     pic 9(4)V9(2).
         77 i     pic 9(4).
       Linkage Section.
         77 a     pic 9(4)V9(2).
         77 b     pic 9(4)V9(2).
         77 n     pic 9(4).
         77 r     pic 9(4)V9(2).
         77 p1    pic 9(4)V9(2).
         77 p2    pic 9(4)V9(2).
         77 p3    pic 9(4)V9(2).
         77 r1    pic 9(4)V9(2).
         77 r2    pic 9(4)V9(2).
         77 r3    pic 9(4)V9(2).
       Procedure Division using a b n r.
        move 0 to r
        compute w=(b-a)/n
        perform varying i from 1 until i=n
          compute p1=a+(i-1)*w
          call f using p1 r1
          compute p2=a-w/2+i*w
          call f using p2 r2
          compute p3=a+i*w
          call f using p3
          compute r=r+w*(r1+4*r2+r3)/6
        end-perform
       End-Program simpson.  

Messung V0.5 in Prozent
C=82 H=97 G=89

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-06-15) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.