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

SSL 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.  

96%


¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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 ist noch experimentell.