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

Quelle  horner.cob   Sprache: Cobol

 

       identification division.
       program-id. horner.
      *  aus D.Nowottny p. 73
      * Mathematik am Computer
       author. "JD".
       date-written. 24.9.2006.
       date-compiled.
       data division.
       working-storage section.
         78 n   pic 9(4) value 3.
         77 i   pic 9(4).
         77 j   pic 9(4).
       linkage section.
         01 p   pic 9(4)V99 occurs n.
         01 val pic 9(4)V99 occurs n.
       procedure division using p val.
      *  Horner Schema für Polynome
         perform varying i from 1 until i > n
           move 0 to val(i)
         end-perform
         perform varying i from 1 until i > n
           perform varying j from 1 until j > n
             multiply val(j) by p(j)
           end-perform
           add p(i) to val(i)
         end-perform.
      *  die Nullstellen sind in val?
        end-program horner.

Messung
CHZG
919910096

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-25) ¤

*© Formatika GbR, Deutschland