Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/tools/perf/pmu-events/arch/powerpc/power8/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 24 kB image not shown  

Quelle  sqrt-real.cob   Sprache: unbekannt

 
       identification division.
       program-id. sqrt-real.
      *  aus Wirth, systematisches Programmieren p. 61 
       author"JD".
       date-written. 11.9.2005.
       date-compiled.
       data division.
       working-storage section.
       77 a   pic 9(4)V9(4).
       77 c   pic 9(4)V9(4).
       77 eps pic 9(4)V9(4) value 0.001.
       linkage section.
       77 x   pic 9(4)V9(4).
       77 r   pic 9(4)V9(4).
       procedure division using x r.
      * computes x * (1-€) <= a**2 < x
         move a to x
         compute c = 1 - x.
         perform until c <= eps
      *    invariant a**2 = x * (1 - c), c >= 0
           compute a = a*(1+0.5*c)
           compute c = c*c*(0.75+0.25*c)
         end-perform.
         move x to r.
        end-program sqrt-real.

Messung V0.5 in Prozent
C=87 H=98 G=92

[Dauer der Verarbeitung: 0.10 Sekunden, vorverarbeitet 2026-05-04]