Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Impressum divfast.cob   Sprache: Cobol

 

       identification division.
       program-id. divfast.
      *  aus Wirth, systematisches Programmieren p. 43
      * vorsichtig: q ist der Zähler und r das Ergebnis 
       author. "JD".
       date-written. 25.10.2004.
       date-compiled.
       data division.
       working-storage section.
       77 q pic 9(4).
       77 w pic 9(4).
       linkage section.
       77 x   pic 9(4).
       77 y   pic 9(4).
       77 r   pic 9(4).
       procedure division using x y r.
      * computes x / y
         move x to r.
         move 0 to q
         move y to w
      * invariant w = 2**n * y > x   
         perform until w = y with test after
      *   q * w + r = x, r >= 0    
           multiply 2 by q
           divide 2 into w
           if w <= r then
             subtract r from w
             add 1 to q
           end-if
         end-perform.
      *  q * y + r = x  0 <= r < y  q = x div y
        end-program divfast.

Messung
CHZG
979810098

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

*Bot Zugriff







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,835
#Domains=906,746