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

Quelle  matrixmult.cob

  Sprache: Cobol
 

       identification division.
       program-id. matrixmult.
      *  aus Wirth, systematisches Programmieren p. 85 
       author"JD".
       date-written11.9.2005.
       date-compiled.
       data division.
       working-storage section.
       78 n   pic 9(4value 10.
       78 m   pic 9(4value 10.
       78 p   pic 9(4value 10.
       77 s   pic 9(4)V9(4).
       77 i   pic 9(4).
       77 j   pic 9(4).
       77 k   pic 9(4).
       linkage section.
       01 fa occurs m.
         05 a pic 9(4)V9(4occurs p.
       01 fb occurs p.
         05 b pic 9(4)V9(4occurs n.
       01 fc occurs m.
         05 c pic 9(4)V9(4occurs n.
       procedure division using fa fb fc.
      * multiply matrices c = a * b
         perform varying i from 1 by 1 until i >= n
           perform varying j from 1 by 1 until j >= n
             move 0 to s
             perform varying k from 1 by 1 until k >= p
               compute s = s + a(i,k) * b(k,j)
             end-perform
             move s to c(i,j)
           end-perform
         end-perform.
      * now c * a * b
        end-program matrixmult.

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

¤ Dauer der Verarbeitung: 0.11 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.