Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Delphi/Bille 0.71/__history/   (Columbo Version 0.7©)  Datei vom 17.0.2013 mit Größe 17 kB image not shown  

Quelle  sqrt-real.cob   Sprache: Cobol

 
       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.

100%


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